0

I have npm 6.4.1 and expo-cli 2.6.0 installed on my windows but when i will run my reactnative project with npm start i get this error:

enter image description here

yaghob abbasi
  • 96
  • 1
  • 12

2 Answers2

2

Update: This has been fixed in expo version 31.0.6. Please upgrade the version of expo in your package.json, run npm install and try again.

This is a bug in the version 31.0.5 (and older) of the expo package on Windows and it will be fixed in the next release. In the meantime you can work around it by either starting the project by running expo start (instead of npm start) or by changing the start script inside package.json from expo start to expo-cli start. Sorry for the trouble!

fson
  • 860
  • 8
  • 9
2

Configure npm to use the new directory path:

npm config set prefix ‘~/.npm-global

In your preferred text editor, open or create a ~/.profile file and add this line:

export PATH=~/.npm-global/bin:$PATH

now install using npm install … or if you already have node_module go for expo start