0

i dont understand why i got this error every time when i try run "npm start".

> @ start E:\ReactNative\navigation_app
> expo start

internal/modules/cjs/loader.js:895
    throw err;
    ^

Error: Cannot find module 'C:\Users\Roei\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:892:15)
    at Function.Module._load (internal/modules/cjs/loader.js:785:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1143:12)
    at internal/main/run_main_module.js:16:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Roei\AppData\Roaming\npm-cache\_logs\2019-11-16T17_19_40_408Z-debug.log

this is my package.json and try to figure out whats wrong there

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "^35.0.0",
    "expo-font": "^7.0.0",
    "react": "16.8.3",
    "react-dom": "16.8.3",
    "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
    "react-native-web": "^0.11.7"
  },
  "devDependencies": {
    "babel-preset-expo": "^7.1.0"
  },
  "private": true
}

i would like to solve that issue and to understand whats worng .

2
  • 1
    did you install? npm install ? Commented Nov 16, 2019 at 17:36
  • yes i did but doesnt work Commented Nov 16, 2019 at 17:50

3 Answers 3

1

You need to install expo-cli globally npm i -g expo-cli

Sign up to request clarification or add additional context in comments.

6 Comments

@roei have you got C:\Users\Roei\AppData\Roaming\npm in your 'Path' environment variables?
@roei sorry I don't understand your reply. is that "yes I have C:\Users\Roei\AppData\Roaming\npm in my 'Path' environment variables" or "no i don't how can it do that"?
i don't know how can i do that, please let me know what should i do .
try this you need to make sure C:\Users\Roei\AppData\Roaming\npm is in 'Path'
i did it also and it show me the same error ..so whats next ?
|
0

you need to install Expo. Run an npm install or install expo globally

Comments

0

You don't have Expo-CLI installed globally, that is why you are getting the error at your local project. It needs Expo module to work, but can't find it. So run npm install -g expo-cli as it has been said, if it does not install paste the error code here.

3 Comments

do you want the log of the run ? coz its long stuff
Error: Cannot find module 'C:\Users\Roei\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js'
If you can't install latest version of Expo, try this: npm i -g [email protected] It is an older version but it will probably install. Latest version is a bit problematic.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.