I'm having issues getting expo to start. It tries to open dev tools and dev tools will not open and gives me this error:
Cannot find module 'C:\Users\charl\AppData\Roaming\npm\node_modules\expo-
cli\node_modules\@expo\image-utils\build\index.js'. Please verify that the
package.json has a valid "main" entry
Error: Cannot find module
'C:\Users\charl\AppData\Roaming\npm\node_modules\expo-
cli\node_modules\@expo\image-utils\build\index.js'. Please verify that the
package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:227:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:364:18)
at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:597:27)
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (C:\@expo\[email protected]\src\AssetUtils.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
This is for a react-native application, using NPM, Node, a Windows 10 machine.
I've tried reinstalling expo with npm and yarn, but i cant get it to work. I looked and saw in the package.json file the 'main' key has a value of 'node_modules/expo/AppEntry.js'. Before this happened i was having trouble with expo that it told me that expo cant be recognized so i messed around with environment variables until it worked. Now this. Thank you guys for any help
I'm having issues getting expo to start. It tries to open dev tools and dev tools will not open and gives me this error:
Cannot find module 'C:\Users\charl\AppData\Roaming\npm\node_modules\expo-
cli\node_modules\@expo\image-utils\build\index.js'. Please verify that the
package.json has a valid "main" entry
Error: Cannot find module
'C:\Users\charl\AppData\Roaming\npm\node_modules\expo-
cli\node_modules\@expo\image-utils\build\index.js'. Please verify that the
package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:227:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:364:18)
at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:597:27)
at Function.Module._load (internal/modules/cjs/loader.js:526:27)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (C:\@expo\[email protected]\src\AssetUtils.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
This is for a react-native application, using NPM, Node, a Windows 10 machine.
I've tried reinstalling expo with npm and yarn, but i cant get it to work. I looked and saw in the package.json file the 'main' key has a value of 'node_modules/expo/AppEntry.js'. Before this happened i was having trouble with expo that it told me that expo cant be recognized so i messed around with environment variables until it worked. Now this. Thank you guys for any help
Share Improve this question edited Jun 24, 2019 at 22:12 Charles Pettis asked Jun 24, 2019 at 22:04 Charles PettisCharles Pettis 3571 gold badge3 silver badges13 bronze badges 3 |4 Answers
Reset to default 7Try running
npm install -g expo-cli --force
Was having this same issue when using Windows Powershell or CMD.exe. Was able to get passed it by using Git Bash. Try running npm install -g expo-cli
from a MINGW64 terminal (ex: Git Bash)
- "node_modules" folder copy/paste from C:\Users\charl.npm-global to C:\Users\charl\AppData\Roaming\npm\
- npm i
I had the same problem. I sort out using two step
first download the Git Bash and installed it , once it was installed open as administrator and wrote the code
npm install -g expo-cli --force
node_modules
andpackage-lock.json
, runnpm install
again. – Lawrence Cherone Commented Jun 24, 2019 at 22:09expo init youproject => cd youproject => expo start
– hong developer Commented Jun 25, 2019 at 9:12