react native windows, spawn npm ENOENT error
Solution 1
[email protected] error
Rollback [email protected]
everything is ok.
Solution 2
This should be fixed in React Native CLI 0.1.9. To update your CLI:
npm uninstall -g react-native-cli
npm install -g react-native-cli
There was a regression in 0.1.8, reported here: https://github.com/facebook/react-native/issues/5169
Solution 3
Check if the gradlew.bat file is present in the android folder if it is not there then simply copy gradlew.bat file from another project.
user2950593
Updated on June 14, 2022Comments
-
user2950593 almost 2 years
I am trying to run react-native on windows and get the following error:
C:\Program Files>react-native init AwesomeProject
This will walk you through creating a new React Native project in C:\Program Fil es\AwesomeProject Installing react-native package from npm... events.js:141 throw er; // Unhandled 'error' event ^
Error: spawn npm ENOENT at exports._errnoException (util.js:860:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32) at onErrorNT (internal/child_process.js:344:16) at doNTCallback2 (node.js:450:9) at process._tickCallback (node.js:364:17) at Function.Module.runMain (module.js:459:11) at startup (node.js:136:18) at node.js:972:3
How do I fix this?