ELIFECYCLE npm error - node.js

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.

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/

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

Electron Builder - Plugin not found, cannot call UAC::_

I have an error when I build my electron app npm run dist but I didn't found a solution that resolve it.
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=C:\laragon\www\app\dist\.__uninstaller-nsis-App_App.exe"
Processing config: C:\Users\User\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.3.2\nsisconf.nsh
Processing script file: "<stdin>" (ACP)
Error output:
Plugin not found, cannot call UAC::_
Error in macro _UAC_MakeLL_Cmp on macroline 2
Error in macro _UAC_IsInnerInstance on macroline 1
Error in macro _If on macroline 9
Error in macro FUNCTION_INSTALL_MODE_PAGE_FUNCTION on macroline 2
Error in macro PAGE_INSTALL_MODE on macroline 17
!include: error in script: "assistedInstaller.nsh" on line 60
Error in script "<stdin>" on line 112 -- aborting creation process
at ChildProcess.<anonymous> (C:\laragon\www\app\node_modules\builder-util\src\util.ts:244:14)
at Object.onceWrapper (events.js:288:20)
at ChildProcess.emit (events.js:200:13)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! App_App#2.3.0 dist: `build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the App_App#2.3.0 dist 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\2020-11-04T10_47_57_428Z-debug.log
The content of the log file:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\laragon2\\bin\\nodejs\\node-v12\\node.exe',
1 verbose cli 'C:\\laragon2\\bin\\nodejs\\node-v12\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dist'
1 verbose cli ]
2 info using npm#6.9.0
3 info using node#v12.5.0
4 verbose run-script [ 'predist', 'dist', 'postdist' ]
5 info lifecycle App_App#2.3.0~predist: App_App#2.3.0
6 info lifecycle App_App#2.3.0~dist: App_App#2.3.0
7 verbose lifecycle App_App#2.3.0~dist: unsafe-perm in lifecycle true
8 verbose lifecycle App_App#2.3.0~dist: PATH: C:\laragon2\bin\nodejs\node-v12\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;
9 verbose lifecycle App_App#2.3.0~dist: CWD: C:\laragon\www\app
10 silly lifecycle App_App#2.3.0~dist: Args: [ '/d /s /c', 'build' ]
11 silly lifecycle App_App#2.3.0~dist: Returned: code: 1 signal: null
12 info lifecycle App_App#2.3.0~dist: Failed to exec dist script
13 verbose stack Error: App_App#2.3.0 dist: `build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\laragon2\bin\nodejs\node-v12\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:200:13)
13 verbose stack at ChildProcess.<anonymous> (C:\laragon2\bin\nodejs\node-v12\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:200:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid App_App#2.3.0
15 verbose cwd C:\laragon\www\app
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\laragon2\\bin\\nodejs\\node-v12\\node.exe" "C:\\laragon2\\bin\\nodejs\\node-v12\\node_modules\\npm\\bin\\npm-cli.js" "run" "dist"
18 verbose node v12.5.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error App_App#2.3.0 dist: `build`
22 error Exit status 1
23 error Failed at the App_App#2.3.0 dist script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I tried to clean npm caches, remove all modules and reinstall it, delete electron-builder caches but nothing happened.
I tested to build the same project in other computer and it works fine.
Does anyone have a solution to my problem?
Thank in advance
If anyone has a similar error I have found the problem: it must not have unicode characters in the electron builder cache path. In my case it was my windows user session.
To change electron cache path:
export ELECTRON_BUILDER_CACHE=C:\Temp
And run npm run dist or yarn dist
Hope this answer can help someone in the future.

Unable to launch React Project

Please find the error logs which I am getting in the terminal
fruits-vegetables#0.1.0 start C:\Users\MY PC\My_Front_End\fruits-vegetables
> react-scripts start
Could not find a required file.
Name: index.html
Searched in: C:\Users\MY PC\My_Front_End\fruits-vegetables\public
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fruits-vegetables#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fruits-vegetables#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\MY PC\AppData\Roaming\npm-cache\_logs\2019-12-20T15_57_41_927Z-debug.log
Please find the debug error 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:\\Users\\MY PC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.13.4
3 info using node#v12.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle fruits-vegetables#0.1.0~prestart: fruits-vegetables#0.1.0
6 info lifecycle fruits-vegetables#0.1.0~start: fruits-vegetables#0.1.0
7 verbose lifecycle fruits-vegetables#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle fruits-vegetables#0.1.0~start: PATH: C:\Users\MY PC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\MY PC\My_Front_End\fruits-vegetables\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Users\MY PC\AppData\Local\Microsoft\WindowsApps;C:\Users\MY PC\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\MY PC\AppData\Roaming\npm;C:\Program Files\Git\bin;C:\Program Files (x86)\Nmap
9 verbose lifecycle fruits-vegetables#0.1.0~start: CWD: C:\Users\MY PC\My_Front_End\fruits-vegetables
10 silly lifecycle fruits-vegetables#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle fruits-vegetables#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle fruits-vegetables#0.1.0~start: Failed to exec start script
13 verbose stack Error: fruits-vegetables#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\MY PC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:209:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\MY PC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:209:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid fruits-vegetables#0.1.0
15 verbose cwd C:\Users\MY PC\My_Front_End\fruits-vegetables
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\MY PC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.10.0
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error fruits-vegetables#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the fruits-vegetables#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 ]
Moreover, I have already tried these suggestions:
delete node modules and package-lock.json
then ran command: npm update
then ran command: npm install
and when I ran npm start I got the same error as above
One more thing which I noticed, whenever I freshly install a react app then I used to get App.js, index.js, index.html even a src folder, I am not getting all these. Please help!
I'm also faced this issue before but fortunately i fixed it for ever you can fix this by going to the ->control pannel ->system and security ->system-> advanced system settings ->environment variables look for system variables and look for ComSpec make sure the path is like this C:\Windows\system32\cmd.exe and restart the system and see it will work

After ejecting create-react-app to update packages, "webpack is not a function"

Using an older version create-react-app on an experimental boilerplate project, I needed to update the packages to proceed. I thought the best way to do this was to eject the create-react-app, but now the whole thing won't run. This is the output after Nodemon:
[1] Failed to compile.
[1]
[1] webpack is not a function
[1]
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! client#0.1.0 start: `node scripts/start.js`
[1] npm ERR! Exit status 1
[1] npm ERR!
npm ERR! Failed at the client#0.1.0 start script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! /Users/gabrielkunkel/.npm/_logs/2019-11-20T23_19_58_956Z-debug.log
If I search the complete log, webpack doesn't show up at all. I wish I could narrow this down to something just useful.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin/node',
1 verbose cli '/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin/npm',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.13.1
3 info using node#v12.8.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle client#0.1.0~prestart: client#0.1.0
6 info lifecycle client#0.1.0~start: client#0.1.0
7 verbose lifecycle client#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle client#0.1.0~start: PATH: /Users/gabrielkunkel/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/gabrielkunkel/Documents/DevCodeCamp/Capstone/kunkl-project/client/node_modules/.bin:/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/gabrielkunkel/Documents/DevCodeCamp/Capstone/kunkl-project/node_modules/.bin:/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/git/bin:/usr/local/MacGPG2/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/gabrielkunkel/.rvm/bin:/Users/gabrielkunkel/.rvm/bin
9 verbose lifecycle client#0.1.0~start: CWD: /Users/gabrielkunkel/Documents/DevCodeCamp/Capstone/kunkl-project/client
10 silly lifecycle client#0.1.0~start: Args: [ '-c', 'node scripts/start.js' ]
11 silly lifecycle client#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle client#0.1.0~start: Failed to exec start script
13 verbose stack Error: client#0.1.0 start: `node scripts/start.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:203:13)
13 verbose stack at ChildProcess.<anonymous> (/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:203:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid client#0.1.0
15 verbose cwd /Users/gabrielkunkel/Documents/DevCodeCamp/Capstone/kunkl-project/client
16 verbose Darwin 16.7.0
17 verbose argv "/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin/node" "/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin/npm" "start"
18 verbose node v12.8.1
19 verbose npm v6.13.1
20 error code ELIFECYCLE
21 error errno 1
22 error client#0.1.0 start: `node scripts/start.js`
22 error Exit status 1
23 error Failed at the client#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 tried cleaning out the node_modules and re-installing them off a suggestion here, with a slightly different problem. I even tried installing webpack globally.
I'm hoping to just fix some small thing and keep going or at least understand why it can't run webpack. As it is, I'm going to be saving all the files and rerun create-react-app unless you can help me.
Your best bet is to build a new create-react-app in a separate folder then to run npm run eject. You then use version control to see the differences in the package.json as well as the config and script folders/files. Update your node modules to match those of the newly created create-react-app and copy/paste the config files.

Resources