react-native node dependency install broke project - node.js

I am trying to develop my first android app using react-native and expo for testing, on windows 8.1.
Working from a tutorial I had a working project using react-native components but everything broke when I installed a dependency with
`npm install --save react-navigation`:
npm-start returned
Error: React native is not installed. Please run 'npm install' in your project directory.
So I ran npm-install again as suggested.
This led to npm-start asking me if I want to install expo-cli globally, and whether I answer yes or no I get the following error:
Installing the package [expo-cli][1]...
events.js:167
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\me\AppData\Roaming\npm-cache\_logs\2018-09-25T21_27_21_053Z-debug.log
The log mentioned in this message is as follows:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#6.4.1
3 info using node#v10.11.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle empty-project-template#~prestart: empty-project-template#
6 info lifecycle empty-project-template#~start: empty-project-template#
7 verbose lifecycle empty-project-template#~start: unsafe-perm in lifecycle true
8 verbose lifecycle empty-project-template#~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\androidProjects\MoviesAndMe\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\libnvvp;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Library\mingw-w64\bin;C:\ProgramData\Anaconda3\Library\usr\bin;C:\ProgramData\Anaconda3\Library\bin;C:\ProgramData\Anaconda3\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Skype\Phone\;C:\Android;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Users\me\Documents\Latex\miktex\bin\;C:\Users\me\AppData\Local\atom\bin;C:\Users\me\AppData\Local\hyper\app-2.0.0\resources\bin;C:\Program Files\Java\jdk1.8.0_181\bin;C:\Users\me\AppData\Roaming\npm
9 verbose lifecycle empty-project-template#~start: CWD: D:\androidProjects\MoviesAndMe
10 silly lifecycle empty-project-template#~start: Args: [ '/d /s /c', 'expo start' ]
11 silly lifecycle empty-project-template#~start: Returned: code: 1 signal: null
12 info lifecycle empty-project-template#~start: Failed to exec start script
13 verbose stack Error: empty-project-template# start: `expo start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid empty-project-template#
15 verbose cwd D:\androidProjects\MoviesAndMe
16 verbose Windows_NT 6.3.9600
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.11.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error empty-project-template# start: `expo start`
22 error Exit status 1
23 error Failed at the empty-project-template# start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I searched on StackOverflow and followed the advice to deal with ELIFECYCLE errors found in this answer. runnning npm cache clean then deleting the node_modules directory and package-lock.json buit the error is the same.
I even tried doing these steps as well as removing the react-navigation from my dependencies in my package.json file and in my code before running npm-install again, but it didn't change anything.
It is interesting to note that when running expo start on it's own it manages to launch the bundler and the devtools in the browser just not with the right ip address.
I also don't know if this is important but when running npm-install I get 2 vulnerabilities, when I run npm-audit it indicates that the is a low 'Prototype Pollution' vulnerability in the lodash package and a High 'Denial of Service' vulnerability in the ws package. But nothing changes even after running npm audit fix
Anyway I hope you can help me, thanks!

I was having the same problem.
If you run:
npm i expo-cli
and then
npm start
It will work

In my case, angular-cli was not installed so I ran the command as -
npm install -g angular-cli

Related

Looking for possible reasons why Next.js Node Server crashes: "npm ERR! code ELIFECYCLE errno 3221225477"

This happened on node version 14.16.0. I encountered the error twice now.
The first time i created a react component with the #mui/lab/DateTimePicker.
I didn't have to install it since #mui/lab was already existing in the project. (tried to reproduce this on another branch(very few changes apart). Didn't work so probably has nothing to do with mui itself)
The second time was also the second approach to the time input component. Using another simpler node module which i had to install this time. (also couldn't reproduce this case) (worked like a charm the second time)
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from C:\develop\strapi-nextjs-poc\nextjs\.env
info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
event - compiled successfully in 5.7s (2008 modules)
wait - compiling /...
info - Using external babel configuration from C:\develop\strapi-nextjs-poc\nextjs\.babelrc
[styled-jsx] Loading plugin from path: C:\develop\strapi-nextjs-poc\nextjs\node_modules\#styled-jsx\plugin-sass\index.js
event - compiled successfully in 6.9s (2236 modules)
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! nextjs#0.1.0 dev: `next dev`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the nextjs#0.1.0 dev 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\sk\AppData\Roaming\npm-cache\_logs\2022-02-17T12_52_28_233Z-debug.log
/c/Program Files/nodejs/npm: line 37: 3732 Segmentation fault "$NODE_EXE" "$NPM_CLI_JS" "$#"
Reverting the current changes sadly doesn't do anything. Even after removing all changes since the last working commit, the branch is still broken.
What i tried so far (in this order):
remove dependencies from sourcecode und package json (just removed everything since last working commit)
deleted .nextjs folder (for caching)
deleted node_modules folder
using nvm to remove the current node version and re-installing it
npm cache clean --force
npm install
After encoutering the error once, it seems to be a permanent issue on the branch (even for other people pulling). So the branch is basicly not useable anymore.
The only way i found to fix the recurrence of the error was upgrading node. Tried with v14.19.0
This just brings the problem of other possible problems with the node version in the project.
Any ideas why this is happening, what causes it or what might fix it?
full log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm#6.14.11
3 info using node#v14.16.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle nextjs#0.1.0~predev: nextjs#0.1.0
6 info lifecycle nextjs#0.1.0~dev: nextjs#0.1.0
7 verbose lifecycle nextjs#0.1.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle nextjs#0.1.0~dev: PATH: C:\Users\sk\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\develop\strapi-nextjs-poc\nextjs\node_modules\.bin;C:\Users\sk\bin;C:\Users\sk\AppData\Local\Programs\Git\mingw64\bin;C:\Users\sk\AppData\Local\Programs\Git\usr\local\bin;C:\Users\sk\AppData\Local\Programs\Git\usr\bin;C:\Users\sk\AppData\Local\Programs\Git\usr\bin;C:\Users\sk\AppData\Local\Programs\Git\mingw64\bin;C:\Users\sk\AppData\Local\Programs\Git\usr\bin;C:\Users\sk\bin;C:\Python39\Scripts;C:\Python39;C:\Program Files\Zulu\zulu11.35.13-ca-jdk11.0.5-win_x64\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python38\Scripts;C:\Python38;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\adminal\.jpm\windows\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Users\sk\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\sk\AppData\Local\Microsoft\WindowsApps;C:\Users\sk\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\sk\AppData\Local\Programs\Git\usr\bin\vendor_perl;C:\Users\sk\AppData\Local\Programs\Git\usr\bin\core_perl
9 verbose lifecycle nextjs#0.1.0~dev: CWD: C:\develop\strapi-nextjs-poc\nextjs
10 silly lifecycle nextjs#0.1.0~dev: Args: [ '/d /s /c', 'next dev' ]
11 silly lifecycle nextjs#0.1.0~dev: Returned: code: 3221225477 signal: null
12 info lifecycle nextjs#0.1.0~dev: Failed to exec dev script
13 verbose stack Error: nextjs#0.1.0 dev: `next dev`
13 verbose stack Exit status 3221225477
13 verbose stack at EventEmitter.<anonymous> (C:\Users\sk\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\sk\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid nextjs#0.1.0
15 verbose cwd C:\develop\strapi-nextjs-poc\nextjs
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v14.16.0
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 3221225477
22 error nextjs#0.1.0 dev: `next dev`
22 error Exit status 3221225477
23 error Failed at the nextjs#0.1.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225477, true ]
Based on error code - it looks like a win32 access violation error as detailed here
NodejS 14.6 is on maintenance mode - consider upgrading to 16 or 17
https://nodejs.org/en/about/releases/

Neither NPM nor GitBash are operational at the moment. How can that be solved?

I am new to GitBash and do not know how it functions within VisualStudio Code. The challenge that I am faced with is enabling React.js to operate within VSCode. As it stands, the error message below is what's being output at this time.
D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\node_modules\babel-jest (version: 27.2.4)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "babel-jest" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\node_modules\babel-jest is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls babel-jest in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed babel-jest.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! affiliate-marketing-project#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the affiliate-marketing-project#0.1.0 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\Refined_Silver\AppData\Roaming\npm-cache\_logs\2021-10-12T16_55_33_704Z-debug.log
PS D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\affiliate-marketing-project>
I followed the instructions above, but to no avail. For starters, "babel-jest" did not exist within the dependencies section of my package.json.
Below is the message that I have been receiving, which is inside of the debug log for React within Visual Studio Code.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.14.15
3 info using node#v14.18.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle affiliate-marketing-project#0.1.0~prestart: affiliate-marketing-project#0.1.0
6 info lifecycle affiliate-marketing-project#0.1.0~start: affiliate-marketing-project#0.1.0
7 verbose lifecycle affiliate-marketing-project#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle affiliate-marketing-project#0.1.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\affiliate-marketing-project\node_modules\.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Python39\Scripts\;C:\Python39\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Git\cmd;C:\Ruby26-x64\bin;C:\Users\Refined_Silver\AppData\Local\Microsoft\WindowsApps;C:\Users\Refined_Silver\AppData\Local\Programs\Microsoft VS Code\bin;C:\ProgramData\Refined_Silver\GitHubDesktop\bin;C:\Users\Refined_Silver\AppData\Roaming\npm;C:\Users\Refined_Silver\AppData\Local\Yarn\bin
9 verbose lifecycle affiliate-marketing-project#0.1.0~start: CWD: D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\affiliate-marketing-project
10 silly lifecycle affiliate-marketing-project#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle affiliate-marketing-project#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle affiliate-marketing-project#0.1.0~start: Failed to exec start script
13 verbose stack Error: affiliate-marketing-project#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:400:28)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1058:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
14 verbose pkgid affiliate-marketing-project#0.1.0
15 verbose cwd D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\affiliate-marketing-project
16 verbose Windows_NT 10.0.19043
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v14.18.0
19 verbose npm v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error affiliate-marketing-project#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the affiliate-marketing-project#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I am not-at-all familiar with how to read what is happening within the NPM / GitBash start-up process. Everything was working fine until I installed GitBash. I would appreciate some assistance with how GitBash functions.
I would appreciate any insight as to how this can be solved. Thank you.
Have you followed step 6 and removed babel-jest in D:\_Dearest_Lord_God,_please_intuitively_reveal_the_things_that_used_to_baffle_me]\_Projects-React]\node_modules ?
react-scripts comes with babel-jest. It warns you about the conflicting installation up the tree.

After switching from one react project to another npm start throws error: The system cannot find the path specified. npm ERR! code ELIFECYCLE

Hey guys figured this place would most likely be able to help me.
So i have 2 react projects project A and project B
Whenever i run project B and then finish and try to run project A(npm start) i get error react-scripts error.
Also it only happens to project A, project B can be re run as many times as i want with no error.
I get following error:
$ npm start
> react-only-template#0.1.0 start E:\projects\project-a
> react-scripts start
The system cannot find the path specified.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-only-template#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-only-template#0.1.0 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:
Log file:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#6.14.11
3 info using node#v10.24.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react-only-template#0.1.0~prestart: react-only-template#0.1.0
6 info lifecycle react-only-template#0.1.0~start: react-only-template#0.1.0
7 verbose lifecycle react-only-template#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle react-only-template#0.1.0~start: PATH: C:\Users\neman\AppData\Roaming\nvm\v10.24.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\projects\project-a\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\neman\bin;C:\Users\neman\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\neman\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\ProgramData\ComposerSetup\bin;E:\xampp\php;E:\php-7.4.7;E:\Vagrant\bin;%NVM_HOME%;%NVM_SYMLINK%;C:\ProgramData\chocolatey\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\neman\AppData\Local\Microsoft\WindowsApps;C:\Users\neman\AppData\Roaming\Composer\vendor\bin;C:\Users\neman\AppData\Roaming\npm;C:\Users\neman\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle react-only-template#0.1.0~start: CWD: E:\projects\project-a
10 silly lifecycle react-only-template#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle react-only-template#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle react-only-template#0.1.0~start: Failed to exec start script
13 verbose stack Error: react-only-template#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\neman\AppData\Roaming\nvm\v10.24.0\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\neman\AppData\Roaming\nvm\v10.24.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid react-only-template#0.1.0
15 verbose cwd E:\projects\project-a
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.24.0
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error react-only-template#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the react-only-template#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
node version 10.24.0
npm: 6.14.11
Also react scripts are not installed globally!
project A:
Is CRA app
"react": "^17.0.1",
"react-scripts": "^4.0.0",
Project B:
Is also CRA app
"react": "^16.13.1",
"react-scripts": "^3.4.3",
Only way I can run project A again is if I restart my PC which is really really panful as I have to re-run docker and a lot of other apps.
I would appreciate anyone who has any suggestions on how to solve this permanently or at least make it so I don't have to restart my computer
This things happens. Have you tried deleting node_moduled, package-lock.json and run this command ? npm cache clean --force

Unable to run npm start in create-react-app

PROBLEM
Need to run my react project
I have install create-react-app and create a project, When I tried to run project using npm start its showing some error
When I first tried in my home dir everythings work fine, Problem only when I tried to create and run in specfic dir
USING
Kubuntu OS,
Nodejs : V10.15.3
npm : 6.9.0
By little bit of google I done following thing
Remove nodemodule and install
Clear npm cache and one again try it as fresh
Uninstall and install both node and npm
Access the project as root
When I try to : npm ls react
kasi#kasi:~/my/node_modules$ npm ls react
my#0.1.0 /home/kasi/my
`-- react#16.8.6
No other things
Some Google - Check point:
kasi#kasi:~/my/node_modules$ which node
/home/kasi/.nvm/versions/node/v10.15.3/bin/node
kasi#kasi:~/my/node_modules$ which npm
/usr/bin/npm
kasi#kasi:~/my/node_modules$ cd ../../../../usr/local/bin/
kasi#kasi:/usr/local/bin$ ls
create-react-app n node npx tsc tsserver
TIP:
All my disk are FAT type so some problem may be on symlink
When I try to start direct as follow
kasi#kasi:/media/kasi/others/reaact/myapp$ node node_modules/react-scripts/scripts/start.js
It show
Starting the development server...
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn /media/kasi/others/reaact/myapp/node_modules/opn/xdg-open EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
I will attach log file created
0 info it worked if it ends with ok
1 verbose cli [ '/home/kasi/.nvm/versions/node/v10.15.3/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'start' ]
2 info using npm#6.9.0
3 info using node#v10.15.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle myapp#0.1.0~prestart: myapp#0.1.0
6 info lifecycle myapp#0.1.0~start: myapp#0.1.0
7 verbose lifecycle myapp#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle myapp#0.1.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/media/kasi/others/reaact/myapp/node_modules/.bin:/home/kasi/.nvm/versions/node/v10.15.3/bin:/home/kasi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle myapp#0.1.0~start: CWD: /media/kasi/others/reaact/myapp
10 silly lifecycle myapp#0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 info lifecycle myapp#0.1.0~start: Failed to exec start script
12 verbose stack Error: myapp#0.1.0 start: `react-scripts start`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:189:13)
12 verbose stack at maybeClose (internal/child_process.js:970:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid myapp#0.1.0
14 verbose cwd /media/kasi/others/reaact/myapp
15 verbose Linux 4.18.0-18-generic
16 verbose argv "/home/kasi/.nvm/versions/node/v10.15.3/bin/node" "/usr/bin/npm" "start"
17 verbose node v10.15.3
18 verbose npm v6.9.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error myapp#0.1.0 start: `react-scripts start`
23 error spawn ENOENT
24 error Failed at the myapp#0.1.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

ELIFECYCLE npm error

This is the error in my console
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! sedona#0.1.0 start: `npm run build && gulp serve`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the sedona#0.1.0 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\User\AppData\Roaming\npm-cache\_logs\2017-07-21T19_40_30_516Z
-debug.log
This is the "debug.log" file from AppData/Roaming etc. path
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#5.3.0
3 info using node#v8.2.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle sedona#0.1.0~prestart: sedona#0.1.0
6 info lifecycle sedona#0.1.0~start: sedona#0.1.0
7 verbose lifecycle sedona#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle sedona#0.1.0~start: PATH: D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\User\Desktop\user.github.io\node_modules\.bin;C:\Users\User\Desktop\cmder\bin;C:\Users\User\Desktop\cmder\vendor\git-for-windows\cmd;C:\Users\User\Desktop\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\Users\User\Desktop\cmder\vendor\conemu-maximus5;C:\Users\User\Desktop\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Skype\Phone\;D:\Program Files\nodejs\;C:\Users\User\AppData\Roaming\npm;C:\Users\User\Desktop\cmder\vendor\git-for-windows\usr\bin;C:\Users\User\Desktop\cmder\vendor\git-for-windows\usr\share\vim\vim74;C:\Users\User\Desktop\cmder\
9 verbose lifecycle sedona#0.1.0~start: CWD: C:\Users\User\Desktop\user.github.io
10 silly lifecycle sedona#0.1.0~start: Args: [ '/d /s /c', 'npm run build && gulp serve' ]
11 silly lifecycle sedona#0.1.0~start: Returned: code: 3221225477 signal: null
12 info lifecycle sedona#0.1.0~start: Failed to exec start script
13 verbose stack Error: sedona#0.1.0 start: `npm run build && gulp serve`
13 verbose stack Exit status 3221225477
13 verbose stack at EventEmitter.<anonymous> (D:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (D:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:921:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid sedona#0.1.0
15 verbose cwd C:\Users\user\Desktop\user.github.io
16 verbose Windows_NT 6.1.7601
17 verbose argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v8.2.1
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 3221225477
22 error sedona#0.1.0 start: `npm run build && gulp serve`
22 error Exit status 3221225477
23 error Failed at the sedona#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225477, true ]
I have already downloaded another gulp-sass projects from other peolpe github's and replace it contains with my own html-sass-js-img files. Error still here btw.
I have already reinstall cmder and node.js. Twice. Error still here.
I have already delete "node-modules" folder from my project and made "npm i" command - nothing changed.
And one fun thing - files in folder "build" updated like always (if you manual lauch them in browser like in old times). But in root folder seems like gulp-sass just don't see that anything happen and zero changes displayed in localhost 3000.
My previous build from yesterday work fine (seemingly) and builds from another people from github work fine too, but why my new build with some changes make that crash??? Only cause sass files changed?
So, there's an interesting cause of this in Jest in VSCode while debugging with Node 12.4.0. When running jest and babel, and placing breakpoints in static classes, the second you place them in the static class, in a static method, node throws this error. To fix, dont write weird static classes.

Resources