Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-854

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None

      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

            Assignee:
            lubo.blagoev@mongodb.com Lubo Blagoev
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: