1

So the error arises when I try to open the iOS simulator from Metro Bundler. This is the second project where I am getting this error, both to do with the node-module 'idb-keyval'. Error only first occurred yesterday and, though I don't know why it would be related, first occurred after I updated NPM to 8.6.0 and then proceeded to install a package.

In the second project, the project that this particular error message is from, the error occurred after npm install'ing Parse.

Below is the full error message:

While trying to resolve module idb-keyval from file /Users/[username]/Development/[projectname]/node_modules/parse/lib/react-native/IndexedDBStorageController.js, the package /Users/[username]/Development/[projectname]/node_modules/idb-keyval/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/[username]/Development/[projectname]/node_modules/idb-keyval/dist/compat.cjs. Indeed, none of these files exist:

  • /Users/[username]/Development/[projectname]/node_modules/idb-keyval/dist/compat.cjs(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
  • /Users/[username]/Development/[projectname]/node_modules/idb-keyval/dist/compat.cjs/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)

If anyone can help me figure out what's going on it would be greatly appreciated.

deejay123
  • 89
  • 7
  • had the same issue, have a look at this answer: https://stackoverflow.com/a/70555971/18931181 – andy Apr 24 '22 at 17:25

0 Answers0