Skip to content

Unable to import SDK to React Native Expo EAS Project #1522

Closed
@isabellaskc

Description

@isabellaskc

New Issue Checklist

Issue Description

When importing parse dependency to an Expo 45 EAS development build, an error occurred.

Steps to reproduce

  1. In an empty expo (javascript) project, ran "yarn add [email protected]" to install the parse sdk dependency
  2. "expo install @react-native-async-storage/async-storage" to install the AsyncStorage dependency
  3. "eas build --profile development --platform ios"
  4. "expo start --dev-client"
  5. added "import Parse from 'parse/react-native';" to App.js
  6. Upon adding and saving the import (step 5) to App.js file, error occurs

Actual Outcome

An error occurred and the app is not running. Details of the error can be found under the logs section

Expected Outcome

App.js to run without error and display the default app.js content

Environment

React Native Expo (package.json):
"@react-native-async-storage/async-storage": "~1.17.3",
"expo": "~45.0.0",
"expo-dev-client": "~1.0.1",
"expo-status-bar": "~1.3.0",
"parse": "3.4.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-web": "0.17.7"

Physical Device:
iPhone XS Software Version 15.6

Server

  • Parse Server version: NA?
  • Operating system: NA?
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): NA?

Database

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

Client

  • Parse JS SDK version: 3.4.2

NA to the above info as issue occurs when importing the dependency

Logs

While resolving module parse/react-native, the Haste package parse was found. However the module react-native could not be found within the package. Indeed, none of these files exist:

/react-native(.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)
/react-native/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)
InternalError Metro has encountered an error: While resolving module parse/react-native, the Haste package parse was found. However the module react-native could not be found within the package. Indeed, none of these files exist:

/react-native(.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)
/react-native/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): /node_modules/metro-resolver/src/resolve.js (205:9)
203 | candidates,
204 | };

205 | throw new MissingFileInHastePackageError(opts);
| ^
206 | }
207 |
208 | class MissingFileInHastePackageError extends Error {
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:35674:25 in showCompileError
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:35593:28 in
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:36109:34 in emit
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:35862:22 in
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:33292:30 in dispatchEvent
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:34185:30 in
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:2720:41 in emit
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:23451:35 in __callFunction
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:23179:30 in
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:23405:14 in __guard
at http://192.168.1.69:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:23178:20 in callFunctionReturnFlushedQueue

While resolving module parse/react-native, the Haste package parse was found. However the module react-native could not be found within the package. Indeed, none of these files exist:

/react-native(.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)
/react-native/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