[GH-ISSUE #249] npm run dev errors, ELIFECYCLE unhandled exception #168

Closed
opened 2026-05-05 11:51:56 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @apollolux on GitHub (Jan 22, 2020).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/249

Describe the bug
Attempting to run via npm run dev fails with an unhandled ELIFECYCLE error. Log as follows:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\apps\\node\\v11.15.0\\node.exe',
1 verbose cli   'C:\\apps\\node\\v11.15.0\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using npm@6.13.6
3 info using node@v11.15.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle lx-pq@0.0.1~predev: lx-pq@0.0.1
6 info lifecycle lx-pq@0.0.1~dev: lx-pq@0.0.1
7 verbose lifecycle lx-pq@0.0.1~dev: unsafe-perm in lifecycle true
8 verbose lifecycle lx-pq@0.0.1~dev: PATH: C:\apps\node\v11.15.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\liqui\Documents\dev\lx-pq\node_modules\.bin;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:\ProgramData\chocolatey\bin;c:\apps\node;C:\apps\node;C:\apps\node\v11.15.0;C:\apps\node\v12.13.0;C:\Users\liqui\AppData\Local\Microsoft\WindowsApps;C:\Program Files\dotnet\;C:\apps\node\v12.13.0;C:\Users\liqui\AppData\Local\Microsoft\WindowsApps;
9 verbose lifecycle lx-pq@0.0.1~dev: CWD: C:\Users\liqui\Documents\dev\lx-pq
10 silly lifecycle lx-pq@0.0.1~dev: Args: [ '/d /s /c', 'webpack --mode=development ' ]
11 silly lifecycle lx-pq@0.0.1~dev: Returned: code: 1  signal: null
12 info lifecycle lx-pq@0.0.1~dev: Failed to exec dev script
13 verbose stack Error: lx-pq@0.0.1 dev: `webpack --mode=development `
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\apps\node\v11.15.0\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:193:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\apps\node\v11.15.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:193:13)
13 verbose stack     at maybeClose (internal/child_process.js:999:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
14 verbose pkgid lx-pq@0.0.1
15 verbose cwd C:\Users\liqui\Documents\dev\lx-pq
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\apps\\node\\v11.15.0\\node.exe" "C:\\apps\\node\\v11.15.0\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v11.15.0
19 verbose npm  v6.13.6
20 error code ELIFECYCLE
21 error errno 1
22 error lx-pq@0.0.1 dev: `webpack --mode=development `
22 error Exit status 1
23 error Failed at the lx-pq@0.0.1 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

To Reproduce
Untouched, freshly created via proton-native init myapp project; run npm run dev once setup is done.

Expected behavior
Expected it to work.

Versions:

  • OS: Windows 10 10.0.18362.535
  • Version proton-native-cli 0.0.7, proton-native 2.0.4
  • Node version 11.15.0

Additional context
Are there any missing dependencies or something? Do I need to install Qt5-dev Win10 flavor somehow or cmake or something? npm run start works fine, however.

Originally created by @apollolux on GitHub (Jan 22, 2020). Original GitHub issue: https://github.com/kusti8/proton-native/issues/249 **Describe the bug** Attempting to run via `npm run dev` fails with an unhandled `ELIFECYCLE` error. Log as follows: ``` 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\apps\\node\\v11.15.0\\node.exe', 1 verbose cli 'C:\\apps\\node\\v11.15.0\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'dev' ] 2 info using npm@6.13.6 3 info using node@v11.15.0 4 verbose run-script [ 'predev', 'dev', 'postdev' ] 5 info lifecycle lx-pq@0.0.1~predev: lx-pq@0.0.1 6 info lifecycle lx-pq@0.0.1~dev: lx-pq@0.0.1 7 verbose lifecycle lx-pq@0.0.1~dev: unsafe-perm in lifecycle true 8 verbose lifecycle lx-pq@0.0.1~dev: PATH: C:\apps\node\v11.15.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\liqui\Documents\dev\lx-pq\node_modules\.bin;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:\ProgramData\chocolatey\bin;c:\apps\node;C:\apps\node;C:\apps\node\v11.15.0;C:\apps\node\v12.13.0;C:\Users\liqui\AppData\Local\Microsoft\WindowsApps;C:\Program Files\dotnet\;C:\apps\node\v12.13.0;C:\Users\liqui\AppData\Local\Microsoft\WindowsApps; 9 verbose lifecycle lx-pq@0.0.1~dev: CWD: C:\Users\liqui\Documents\dev\lx-pq 10 silly lifecycle lx-pq@0.0.1~dev: Args: [ '/d /s /c', 'webpack --mode=development ' ] 11 silly lifecycle lx-pq@0.0.1~dev: Returned: code: 1 signal: null 12 info lifecycle lx-pq@0.0.1~dev: Failed to exec dev script 13 verbose stack Error: lx-pq@0.0.1 dev: `webpack --mode=development ` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\apps\node\v11.15.0\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:193:13) 13 verbose stack at ChildProcess.<anonymous> (C:\apps\node\v11.15.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:193:13) 13 verbose stack at maybeClose (internal/child_process.js:999:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5) 14 verbose pkgid lx-pq@0.0.1 15 verbose cwd C:\Users\liqui\Documents\dev\lx-pq 16 verbose Windows_NT 10.0.18362 17 verbose argv "C:\\apps\\node\\v11.15.0\\node.exe" "C:\\apps\\node\\v11.15.0\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev" 18 verbose node v11.15.0 19 verbose npm v6.13.6 20 error code ELIFECYCLE 21 error errno 1 22 error lx-pq@0.0.1 dev: `webpack --mode=development ` 22 error Exit status 1 23 error Failed at the lx-pq@0.0.1 dev script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ] ``` **To Reproduce** Untouched, freshly created via `proton-native init myapp` project; run `npm run dev` once setup is done. **Expected behavior** Expected it to work. **Versions:** - OS: Windows 10 10.0.18362.535 - Version proton-native-cli 0.0.7, proton-native 2.0.4 - Node version 11.15.0 **Additional context** Are there any missing dependencies or something? Do I need to install Qt5-dev Win10 flavor somehow or cmake or something? `npm run start` works fine, however.
gitea-mirror 2026-05-05 11:51:56 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@apollolux commented on GitHub (Jan 22, 2020):

Apparently the logfile sucks, the below seems to be the actual error to look at:

events.js:170
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19)
    at onErrorNT (internal/child_process.js:429:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:17)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:253:12)
    at onErrorNT (internal/child_process.js:429:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:17)
<!-- gh-comment-id:576965493 --> @apollolux commented on GitHub (Jan 22, 2020): Apparently the logfile sucks, the below seems to be the actual error to look at: ``` events.js:170 throw er; // Unhandled 'error' event ^ Error: spawn npm ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19) at onErrorNT (internal/child_process.js:429:16) at processTicksAndRejections (internal/process/task_queues.js:81:17) Emitted 'error' event at: at Process.ChildProcess._handle.onexit (internal/child_process.js:253:12) at onErrorNT (internal/child_process.js:429:16) at processTicksAndRejections (internal/process/task_queues.js:81:17) ```
Author
Owner

@apollolux commented on GitHub (Jan 27, 2020):

Figured it out from this Stack Overflow answer - Windows vs non-Windows way of calling npm

instance = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ["run", "webpackRun"]);

Gonna PR proton-native-cli shortly.

<!-- gh-comment-id:578940640 --> @apollolux commented on GitHub (Jan 27, 2020): Figured it out from [this Stack Overflow answer](https://stackoverflow.com/a/43285131/402692) - Windows vs non-Windows way of calling `npm` ```instance = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ["run", "webpackRun"]);``` Gonna PR proton-native-cli shortly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#168
No description provided.