webpack / laravel mix Error: Chunk.entrypoints: Use Chunks.groupsIterable - node.js

I'm encoutering an error when trying to run 'npm run watch', a command to run the laravel mix watcher.
In Short
1. It works on my Macbook, same OS version, same NPM version, same project.
2. I tried reïnstalling nodeJS and removed my node_modules.
3. I tried all kinds of solutions on stack overflow based on the first
line on the error log (error: Chunk.entrypoints (...)).
Here is the error log:
Johrs-iMac:tdc-roots johrclaessens$ npm run watch
> pagekit#1.0.0 watch /Users/johrclaessens/stack/TDC/Web/projects/tdc-roots
> NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
10% building modules 1/1 modules 0 active
webpack is watching the files…
77% module and chunk tree optimization unnamed compat plugin/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/webpack/lib/Chunk.js:460
throw new Error(
^
Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
at Chunk.get (/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/webpack/lib/Chunk.js:460:9)
at /Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:176:48
at Array.forEach (<anonymous>)
at /Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:171:18
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:12:1)
at AsyncSeriesHook.lazyCompileHook (/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/tapable/lib/Hook.js:154:20)
at Compilation.seal (/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/webpack/lib/Compilation.js:881:27)
at hooks.make.callAsync.err (/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/webpack/lib/Compiler.js:464:17)
at _err0 (eval at create (/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:11:1)
at _addModuleChain (/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/webpack/lib/Compilation.js:749:12)
at processModuleDependencies.err (/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/webpack/lib/Compilation.js:688:9)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pagekit#1.0.0 watch: `NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pagekit#1.0.0 watch 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! /Users/johrclaessens/.npm/_logs/2018-10-24T20_33_19_843Z-debug.log
And npm's error log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'watch' ]
2 info using npm#6.4.1
3 info using node#v8.12.0
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle pagekit#1.0.0~prewatch: pagekit#1.0.0
6 info lifecycle pagekit#1.0.0~watch: pagekit#1.0.0
7 verbose lifecycle pagekit#1.0.0~watch: unsafe-perm in lifecycle true
8 verbose lifecycle pagekit#1.0.0~watch: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/johrclaessens/stack/TDC/Web/projects/tdc-roots/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/johrclaessens/.nexustools:/Applications/DevDesktop/tools
9 verbose lifecycle pagekit#1.0.0~watch: CWD: /Users/johrclaessens/stack/TDC/Web/projects/tdc-roots
10 silly lifecycle pagekit#1.0.0~watch: Args: [ '-c',
10 silly lifecycle 'NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ]
11 silly lifecycle pagekit#1.0.0~watch: Returned: code: 1 signal: null
12 info lifecycle pagekit#1.0.0~watch: Failed to exec watch script
13 verbose stack Error: pagekit#1.0.0 watch: `NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid pagekit#1.0.0
15 verbose cwd /Users/johrclaessens/stack/TDC/Web/projects/tdc-roots
16 verbose Darwin 18.0.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "watch"
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error pagekit#1.0.0 watch: `NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
22 error Exit status 1
23 error Failed at the pagekit#1.0.0 watch script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Can anyone help me with a fix?
Thanks in advance!

The problem was solved by deleting the project directory and a git clone from the source. a quick npm install and laravel mix ran without any problems.

Related

ENOENT webpack-dev-server esm

I inherited a react project hosted on azure-devops.
Cloned local repository
Need to downgrade npm and node versions to:
npm#6.14.8
node#v14.14.0
After that successfully install modules (npm i)
but now I can not run npm start and it's getting me this error.
npm start
> #0.1.0 start
> node -r esm scripts/run-webpack.js webpack-dev-server
spawn called
[Arguments] {
'0': '\\node_modules\\.bin\\webpack-dev-server',
'1': [ '-r', 'esm', '--mode=development', '--color' ],
'2': {
env: { NODE_ENV: 'development' },
windowsHide: true,
stdio: 'inherit'
}
}
Error: spawn \node_modules\.bin\webpack-dev-server ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:62:3)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:62:3)
at \Frontend\node_modules\esm\esm.js:1:34535
at \Frontend\node_modules\esm\esm.js:1:34176
at process.<anonymous> (\node_modules\esm\esm.js:1:34506)
at Function.<anonymous> (\node_modules\esm\esm.js:1:296856)
at Function.<anonymous> (\node_modules\esm\esm.js:1:296555)
at Function.<anonymous> (\node_modules\esm\esm.js:1:284879) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn \\node_modules\\.bin\\webpack-dev-server',
path: '\\node_modules\\.bin\\webpack-dev-server',
spawnargs: [ '-r', 'esm', '--mode=development', '--color' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #0.1.0 start: `node -r esm scripts/run-webpack.js webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #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! \AppData\Roaming\npm-cache\_logs\2022-03-16T09_23_36_828Z-debug.log
Log here:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '\\nodejs\\node.exe',
1 verbose cli '\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.14.8
3 info using node#v14.14.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle #0.1.0~prestart: #0.1.0
6 info lifecycle #0.1.0~start: #0.1.0
7 verbose lifecycle #0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle #0.1.0~start: PATH: \nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;\node_modules\.bin;\Python39\Scripts\;\Python39\;\Java\jre1.8.0_281\bin; (x86)\Common Files\Oracle\Java\javapath;\Ruby23-x64\bin;\Ruby23-x64\bin;\Windows\system32;\Windows;\Windows\System32\Wbem;\Windows\System32\WindowsPowerShell\v1.0\;\Windows\System32\OpenSSH\; (x86)\NVIDIA Corporation\PhysX\Common;\NVIDIA Corporation\NVIDIA NvDLISR;\Microsoft SQL Server\130\Tools\Binn\;\TortoiseSVN\bin;\Git\cmd; (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\; (x86)\Microsoft SQL Server\140\Tools\Binn\; (x86)\Microsoft SQL Server\140\DTS\Binn\; (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;\devkit\mingw\bin; (x86)\Microsoft SQL Server\150\DTS\Binn\;\jruby-9.1.17.0\bin;\ProgramData\chocolatey\bin;\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;\WINDOWS\system32;\WINDOWS;\WINDOWS\System32\Wbem;\WINDOWS\System32\WindowsPowerShell\v1.0\;\WINDOWS\System32\OpenSSH\;\TortoiseGit\bin; (x86)\Microsoft SQL Server\150\Tools\Binn\;\Microsoft SQL Server\150\Tools\Binn\;\Microsoft SQL Server\150\DTS\Binn\;\WINDOWS\system32;\WINDOWS;\WINDOWS\System32\Wbem;\WINDOWS\System32\WindowsPowerShell\v1.0\;\WINDOWS\System32\OpenSSH\;\dotnet\;\Azure Data Studio\bin;\Docker\Docker\resources\bin;\ProgramData\DockerDesktop\version-bin;\nodejs\;\jruby-9.1.17.0\bin;\Ruby23-x64\bin;\AppData\Local\Microsoft\WindowsApps;\.dotnet\tools;\AppData\Local\Programs\Microsoft VS Code\bin;;\Azure Data Studio\bin;\AppData\Roaming\npm
9 verbose lifecycle #0.1.0~start: CWD:
10 silly lifecycle #0.1.0~start: Args: [ '/d /s /c', 'node -r esm scripts/run-webpack.js webpack-dev-server' ]
11 silly lifecycle #0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle #0.1.0~start: Failed to exec start script
13 verbose stack Error: #0.1.0 start: `node -r esm scripts/run-webpack.js webpack-dev-server`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (\nodejs\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> (\nodejs\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 #0.1.0
15 verbose cwd
16 verbose Windows_NT 10.0.22000
17 verbose argv "\\nodejs\\node.exe" "\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v14.14.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error #0.1.0 start: `node -r esm scripts/run-webpack.js webpack-dev-server`
22 error Exit status 1
23 error Failed at the #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 have tried everything in my power but nothing worked and now I am desperate, please help!
ENOENT webpack-dev-server esm
According to the error message, it seems this issue related to the webpack-dev-server.
So, please try to access the command webpack-dev-server, you could try to set a command in npm's package.json file like
"scripts": {
"start": "webpack-dev-server -d --config webpack.dev.config.js --content-base public/ --progress --colors"
}
Or you could try to install the script in global scope as well before you run the npm start:
sudo npm install -g webpack-dev-server

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

After "npx create-react-app" "npm start" fails with following error: TypeError: Cannot read property 'split' of undefined

Node v12.18.4
Npm 6.14.11
react-scripts 4.0.1
Hello, this is not my first react-app but I am getting an error that makes no sense.
After using "npx create-react-app" cd into my app and "npm start" I am getting this error
/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/react-scripts/scripts/start.js:19
throw err;
^
TypeError: Cannot read property 'split' of undefined
at processModule (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/eslint-webpack-plugin/dist/index.js:93:38)
at SyncHook.eval [as call] (eval at create (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:5:1)
at SyncHook.lazyCompileHook (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/tapable/lib/Hook.js:154:20)
at /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/Compilation.js:781:30
at MultiModule.build (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/MultiModule.js:39:10)
at Compilation.buildModule (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/Compilation.js:739:10)
at /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/Compilation.js:1111:12
at MultiModuleFactory.create (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/MultiModuleFactory.js:18:3)
at /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/Compilation.js:1063:18
at Semaphore.acquire (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/util/Semaphore.js:29:4)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todo-app#0.1.0 start: `./node_modules/react-scripts/bin/react-scripts.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todo-app#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! /Users/pablodeyzaguirre/.npm/_logs/2021-01-19T13_21_16_205Z-debug.log
MBP-de-Pablo:todo-app pablodeyzaguirre$
I have deleted node_modules and installed again, installed react-scripts globally, updated npm & react version.
The full log of the error is:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm#6.14.11
3 info using node#v12.18.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle todo-app#0.1.0~prestart: todo-app#0.1.0
6 info lifecycle todo-app#0.1.0~start: todo-app#0.1.0
7 verbose lifecycle todo-app#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle todo-app#0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/.bin:/Users/pablodeyzaguirre/.symfony/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/pablodeyzaguirre/.symfony/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Users/pablodeyzaguirre/Library/Android/sdk/emulator:/Users/pablodeyzaguirre/Library/Android/sdk/tools:/Users/pablodeyzaguirre/Library/Android/sdk/tools/bin:/Users/pablodeyzaguirre/Library/Android/sdk/platform-tools:/Users/pablodeyzaguirre/Library/Android/sdk/emulator:/Users/pablodeyzaguirre/Library/Android/sdk/tools:/Users/pablodeyzaguirre/Library/Android/sdk/tools/bin:/Users/pablodeyzaguirre/Library/Android/sdk/platform-tools
9 verbose lifecycle todo-app#0.1.0~start: CWD: /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app
10 silly lifecycle todo-app#0.1.0~start: Args: [ '-c', './node_modules/react-scripts/bin/react-scripts.js start' ]
11 silly lifecycle todo-app#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle todo-app#0.1.0~start: Failed to exec start script
13 verbose stack Error: todo-app#0.1.0 start: `./node_modules/react-scripts/bin/react-scripts.js start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/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> (/usr/local/lib/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:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid todo-app#0.1.0
15 verbose cwd /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app
16 verbose Darwin 20.2.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v12.18.4
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error todo-app#0.1.0 start: `./node_modules/react-scripts/bin/react-scripts.js start`
22 error Exit status 1
23 error Failed at the todo-app#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 ]
If someone has encountered this problem before pls help, I have been looking around in google and stackoverflow with no luck
Encountered basically the same issue as you. For us it ended up being special quotes in our env variables. Once we removed those, it all worked ... 🤯
Took a work day to figure this one out!

Why can i not run my project in development mode?

When I use npm run serve, I get following message.
PS C:\Users\Jan\Desktop\projektgruppe\Main> npm run serve
> editor#0.1.0 serve C:\Users\Jan\Desktop\projektgruppe\Main
> concurrently "nodemon -L --inspect=0.0.0.0:9001 ./server/index.js" "vue-cli-service build ./src/main.js --mode development --watch"
[0] Error occurred when executing command: nodemon -L --inspect=0.0.0.0:9001 ./server/index.js
[0] Error: spawn cmd.exe ENOENT
[0] at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
[0] at onErrorNT (internal/child_process.js:456:16)
[0] at processTicksAndRejections (internal/process/task_queues.js:81:21)
[1] Error occurred when executing command: vue-cli-service build ./src/main.js --mode development --watch
[1] Error: spawn cmd.exe ENOENT
[1] at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
[1] at onErrorNT (internal/child_process.js:456:16)
[1] at processTicksAndRejections (internal/process/task_queues.js:81:21)
[1] vue-cli-service build ./src/main.js --mode development --watch exited with code -4058
[0] nodemon -L --inspect=0.0.0.0:9001 ./server/index.js exited with code -4058
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! editor#0.1.0 serve: `concurrently "nodemon -L --inspect=0.0.0.0:9001 ./server/index.js" "vue-cli-service build ./src/main.js --mode development --watch"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the editor#0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
and my log file is this
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\node\\node.exe',
1 verbose cli 'C:\\Program Files\\node\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'serve'
1 verbose cli ]
2 info using npm#6.13.6
3 info using node#v12.14.1
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle editor#0.1.0~preserve: editor#0.1.0
6 info lifecycle editor#0.1.0~serve: editor#0.1.0
7 verbose lifecycle editor#0.1.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle editor#0.1.0~serve: PATH: C:\Program Files\node\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Jan\Desktop\projektgruppe\Main\node_modules\.bin;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\node\;C:\Program Files\Git\cmd;C:\Users\Jan\AppData\Local\Microsoft\WindowsApps;C:\Users\Jan\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Jan\AppData\Roaming\npm
9 verbose lifecycle editor#0.1.0~serve: CWD: C:\Users\Jan\Desktop\projektgruppe\Main
10 silly lifecycle editor#0.1.0~serve: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'concurrently "nodemon -L --inspect=0.0.0.0:9001 ./server/index.js" "vue-cli-service build ./src/main.js --mode development --watch"'
10 silly lifecycle ]
11 silly lifecycle editor#0.1.0~serve: Returned: code: 1 signal: null
12 info lifecycle editor#0.1.0~serve: Failed to exec serve script
13 verbose stack Error: editor#0.1.0 serve: `concurrently "nodemon -L --inspect=0.0.0.0:9001 ./server/index.js" "vue-cli-service build ./src/main.js --mode development --watch"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\node\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:223:5)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\node\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:223:5)
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 editor#0.1.0
15 verbose cwd C:\Users\Jan\Desktop\projektgruppe\Main
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\node\\node.exe" "C:\\Program Files\\node\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"
18 verbose node v12.14.1
19 verbose npm v6.13.6
20 error code ELIFECYCLE
21 error errno 1
22 error editor#0.1.0 serve: `concurrently "nodemon -L --inspect=0.0.0.0:9001 ./server/index.js" "vue-cli-service build ./src/main.js --mode development --watch"`
22 error Exit status 1
23 error Failed at the editor#0.1.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
It always worked, but now not. I tried many times to uninstall node modules. I reinstalled many times node, but I can not find the mistake. I have no Problem, when I just build it and start it. But that is not nice for development.
"start": "node ./server/index.js",
"serve": "concurrently \"nodemon -L --inspect=0.0.0.0:9001 ./server/index.js\" \"vue-cli-service build ./src/main.js --mode development --watch\"",
"build": "vue-cli-service build ./src/main.js",
Would be so glad for any help.
Thanks

Why does my webpack project fail to build when i clone from github repo?

So I had an old version of a project on one machine in regards to a project that is a github repo being worked on using a different machine.
So I deleted the folder of the old version on the first machine (backed up to a local folder beforehand). Then I did git pull origin master to pull the project from the github repo. I did npm install, npm audit fix and npm audit -f fix to get rid of vulnerabilities.
This project uses webpack and vue-cli so I put npm run dev into the terminal and now I'm getting an error without any information about why the error is happening.
Here is the github repo, follow the steps I just described to reproduce.
https://github.com/adamcole123/pharaoh-web-app
Thanks in advance!
EDITS:
I feel like it may be something to do with global dependencies, but i have no idea what they would be. So if anyone knows that would be great :)
(i forgot to add the error that i got):
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pharaoh-web-app#1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pharaoh-web-app#1.0.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\Adam\AppData\Roaming\npm-cache\_logs\2019-04-06T14_44_39_545Z-debug.log
and the debug log it references:
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 'run',
1 verbose cli 'dev' ]
2 info using npm#6.4.1
3 info using node#v10.15.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle pharaoh-web-app#1.0.0~predev: pharaoh-web-app#1.0.0
6 info lifecycle pharaoh-web-app#1.0.0~dev: pharaoh-web-app#1.0.0
7 verbose lifecycle pharaoh-web-app#1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle pharaoh-web-app#1.0.0~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\nodeprojects\pharaoh-web-app\node_modules\.bin;C:\Users\Adam\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\MATLAB\R2018b\runtime\win64;C:\Program Files\MATLAB\R2018b\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\Adam\AppData\Local\Microsoft\WindowsApps;C:\Users\Adam\AppData\Local\Programs\Python\Python37-32;C:\Program Files\MongoDB\Server\4.0\bin;;C:\Users\Adam\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Adam\AppData\Roaming\npm
9 verbose lifecycle pharaoh-web-app#1.0.0~dev: CWD: C:\nodeprojects\pharaoh-web-app
10 silly lifecycle pharaoh-web-app#1.0.0~dev: Args: [ '/d /s /c',
10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js' ]
11 silly lifecycle pharaoh-web-app#1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle pharaoh-web-app#1.0.0~dev: Failed to exec dev script
13 verbose stack Error: pharaoh-web-app#1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
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:189: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:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid pharaoh-web-app#1.0.0
15 verbose cwd C:\nodeprojects\pharaoh-web-app
16 verbose Windows_NT 10.0.17134
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 v10.15.3
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error pharaoh-web-app#1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
22 error Exit status 1
23 error Failed at the pharaoh-web-app#1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Please try .\node_modules\.bin\eslint (the path separator is \ on Windows) or eslint-cli.
I think this will help you:
https://github.com/eslint/eslint/issues/10176

Resources