Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

'invalidateCache' is not exported from './util' #3314

Closed
tekkengreg opened this issue Oct 8, 2020 · 4 comments
Closed

'invalidateCache' is not exported from './util' #3314

tekkengreg opened this issue Oct 8, 2020 · 4 comments
Assignees

Comments

@tekkengreg
Copy link

tekkengreg commented Oct 8, 2020

Goals

Hi

I'm working on Mongodb Realm app, based on Reactjs in typescript.

Expected Results

At this moment I want to build the app successfully 😀

Actual Results

at build :

./node_modules/realm/lib/browser/index.js
Attempted import error: 'invalidateCache' is not exported from './util' (imported as 'util').

Steps to Reproduce

npm i realm@^10.0.0-rc.1

Code Sample

I installed v10.0.0-rc.1 but I got this error

./node_modules/realm/lib/browser/index.js
Attempted import error: 'invalidateCache' is not exported from './util' (imported as 'util').

If I'm looking into realm/lib/browser/util.js , invalidateCache is well imported from ./cache :

import {invalidateCache, getRealmCache} from './cache';

But invalidateCache is not exported at all.

If I'm looking into realm/lib/browser/util.js, util is imported and invalidateCache():

import * as util from './util';
...
util.invalidateCache();

Something is missing. If util.invalidateCache(); is used to export the function in util.js, if not import invalidateCache from cache.js and use invalidateCache() directly.

Version of Realm and Tooling

  • Realm JS SDK Version: 10.0.0-rc.1
  • Node or React Native: 14.5
  • Client OS & Version: mac
  • Which debugger for React Native: ?/None

Thank you

@RealmBot
Copy link

RealmBot commented Oct 9, 2020

➤ Lyubomir Blagoev commented:

This is fixed. closing it

@RealmBot RealmBot closed this as completed Oct 9, 2020
@RealmBot
Copy link

➤ Ian Ward commented:

[~brian.munkholm] Why doesn't the commit URL show up in the public realm-js issue?

@bmunkholm
Copy link
Contributor

@ianpward Because @blagoev forgot to mention the issue in his PR.

@sync-by-unito
Copy link

sync-by-unito bot commented Nov 27, 2020

➤ Brian Munkholm commented:

Actually - it was because it was done in an "edit" of an existing comment. Those edits don't sync.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

4 participants