-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows 10 failure #198
Comments
looks you don't have npm on tbe machine?
Le sam. 8 janv. 2022, 09:48, sundansx ***@***.***> a écrit :
… Trying to run the newest mydomoathome on win7 and getting this error.
mydomoathome 0.2.39 runs fine on the same system/node version. *Any idea
what's could be causing this*? note: xxx's for privacy.
info: Domoticz server: http://xxxxxxxxxxxxxxx/json.htm
info: Node version: 12.19.0
info: MDAH version: MyDomoAtHome 0.2.41
info: OS version: Windows_NT win32 6.1.7601 (windows7)
info: Hostname: webserver xxxxx in C:\Users\xxxx
C:\utils\nodejs-apps\MyDomoAtHome-nodejs
events.js:291
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn npm',
path: 'npm',
spawnargs: [ '-v' ]
}
—
Reply to this email directly, view it on GitHub
<#198>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXTDCSYVZUQGD22EDOMH4LUU726XANCNFSM5LQMB2SQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
empierre, thanks for responding. Here is what I get when I type 'npm' on the command line: is the syscall 'spawn npm' a newer addiition? because domoathome 0.2.39 works fine. Here is the log when I did a "npm install' on the 0.2.41 release: added 817 packages from 1032 contributors and audited 819 packages in 18.433s 56 packages are looking for funding found 13 vulnerabilities (10 moderate, 3 high) |
I found the cause of this - it involves a long known crossplatform bug on node.js. It looks like the addition of the ability of mdah to query npm version broke cross platform compatibility at some point. There are a few solutions to use. I went with adding the node module 'cross-spawn' lib and then making a change to mdah.js. This fix should be cross-platform compatible:
|
followup note on this: the reason it broke is "npm" is implemented as a batch script named "npm.cmd" on Windows and the regular jscript spawn does not find things in the path other than '.exe' files. |
Trying to run the newest mydomoathome on win7 and getting this error. mydomoathome 0.2.39 runs fine on the same system/node version. Any idea what's could be causing this? note: xxx's for privacy.
info: Domoticz server: http://xxxxxxxxxxxxxxx/json.htm
info: Node version: 12.19.0
info: MDAH version: MyDomoAtHome 0.2.41
info: OS version: Windows_NT win32 6.1.7601 (windows7)
info: Hostname: webserver xxxxx in C:\Users\xxxx C:\utils\nodejs-apps\MyDomoAtHome-nodejs
events.js:291
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn npm',
path: 'npm',
spawnargs: [ '-v' ]
}
The text was updated successfully, but these errors were encountered: