Parse-SDK-JS icon indicating copy to clipboard operation
Parse-SDK-JS copied to clipboard

Unable to import SDK to React Native Expo EAS Project

Open isabellaskc opened this issue 3 years ago • 3 comments

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)

isabellaskc avatar Aug 03 '22 07:08 isabellaskc

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

I've labelled this as bug although I'm not sure if there are any special requirements for EAS compatibility and if yes, whether Parse Platform (should) support that.

mtrezza avatar Aug 11 '22 09:08 mtrezza

Add on info: When the parse dependency is changed to version 3.4.0 , the mentioned issue would be resolved

isabellaskc avatar Aug 16 '22 01:08 isabellaskc

Completed by https://github.com/parse-community/Parse-SDK-JS/pull/2109

dplewis avatar Apr 15 '24 16:04 dplewis