i create a sample project with (my os : Windows 10 ) ;
expo init test
cd test
npm start
everything works well and i can see my app on phone and my package.json looks ;
{
"name": "empty-project-template",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"expo": "^30.0.1",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
}
}
But if i want to install a package like "uuid" ;
npm install uuid
package is installed without problems , then i wrote ;
npm start
This command requires Expo CLI.
Do you want to install it globally [Y/n]?
i press 'Y' , but it gives that errors ;
This command requires Expo CLI.
Do you want to install it globally [Y/n]? y
Installing the package 'expo-cli'...
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:362:16)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! empty-project-template@ start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the empty-project-template@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Package name is not important , if i install any package and run npm start
, my project is down and i cant use my project, i tested this step with yarn
, its same like npm
, what is my mistake ?
For those struggling with this issue,
You are good to go.
For me, run expo start
directly will work. Seems like npm
does not know yet the existent of expo-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With