expo: Error: Unable to resolve module `./node_modules\expo\AppEntry` from ``
I’m getting this when i try to open the project in the expo client app. I’ve the expo-cli and the expo client app updated to the lastest version
Error: Unable to resolve module `./node_modules\expo\AppEntry` from ``:
None of these files exist:
* node_modules\expo\AppEntry(.native|.android.expo.ts|.native.expo.ts|.expo.ts|.android.expo.tsx|.native.expo.tsx|.expo.tsx|.android.expo.js|.native.expo.js|.expo.js|.android.expo.jsx|.native.expo.jsx|.expo.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.wasm|.native.wasm|.wasm)
* node_modules\expo\AppEntry\index(.native|.android.expo.ts|.native.expo.ts|.expo.ts|.android.expo.tsx|.native.expo.tsx|.expo.tsx|.android.expo.js|.native.expo.js|.expo.js|.android.expo.jsx|.native.expo.jsx|.expo.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.wasm|.native.wasm|.wasm)
Environment
Expo CLI 3.28.5 environment info: System: OS: Windows 10 10.0.18362 Binaries: Node: 12.18.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.19.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD Watchman: 20200424.164118.0 - D:\Instaladores\watchman\windows\bin\watchman.EXE SDKs: Android SDK: API Levels: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 7, 8, 9 Build Tools: 24.0.3, 25.0.3, 26.0.0, 26.0.2, 27.0.1, 27.0.2, 27.0.3, 28.0.3 System Images: android-25 | Google APIs Intel x86 Atom Android NDK: 16.1.4479499 npmPackages: expo: ^36.0.0 => 36.0.2 react: ^16.12.0 => 16.12.0 react-dom: 16.9.0 => 16.9.0 react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4 react-native-web: ^0.11.7 => 0.11.7 react-navigation: 4.1.1 => 4.1.1 Expo Workflow: managed
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 7
- Comments: 26 (10 by maintainers)
Hasn’t worked for me.
In my case the fault was
PNPM. Changed toNPMand everything worked.@Alain00 - sorry i missed your message.
then problem is that you included node_modules in your watchman ignore_dirs… watchman is used for crawling and watching the fs. you won’t be able to resolve any node_modules if you do this. https://github.com/Alain00/expo-test/blob/master/.watchmanconfig#L3
delete that line and run
expo start -c@jeremeheh - provide a repo like @Alain00 did above and i’ll let you know where your project configuration is messed up 😉
I work with students and two of them this week reported this same issue. Fresh installs, Node 14.9.0, latest version of expo-cli installed using Yarn, nothing added to the starter code from expo init, both using Android emulators. Expo SDK 39. The error went away after downgrading SDK to 38.
If you’re using
pnpm, create anindex.ts(or JS) file in your project root with this:In package.json, set
"main"to"index.ts"Create a
.npmrcfile in your project root with this:For anyone that is having issues, and need the bug resolved asap, I just kept changing the path of AppEntry and eventually it worked. Honestly thats all I did, and started using
expo start --clear.Is there any fix on this issue? Im currently having the same problem
@brentvatne I cloned my project and left it with the minimal code, just an
App.tsxand the error still shows up, here is the project https://github.com/Alain00/expo-test, could you check it please? I’ve others expo projects working fine