Skip to content

React native SDK error: While trying to resolve module idb-keyval from file #1441

Closed
@zealmurapa

Description

@zealmurapa

New Issue Checklist

Issue Description

I am suddenly getting an error with the new release of parse and including the old ones too regarding idb-keyval. I see that the latest release sought to address that bug, however it doesn't seem to go away.

Steps to reproduce

import Server from "parse/react-native.js";
import AsyncStorage from '@react-native-async-storage/async-storage';

Server.setAsyncStorage(AsyncStorage);
Server.initialize(Constants.APP_ID, Constants.JAVASCRIPT_KEY);
Server.serverURL = Constants.APP_API;

then try run the app in the emulator

Actual Outcome

Check the logs below

Expected Outcome

that the react native build should run as usual following: (import Server from "parse/react-native.js";)

Environment

Node JS 12 on Mac iOS Big sur

Server

  • Parse Server version: 5.0.0-beta.4
  • Operating system: Mac OS
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 4.2
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): MongoDB Atlas

Client

  • Parse JS SDK version: 3.4.1

Logs

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

  • /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)
  • /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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions