-
Notifications
You must be signed in to change notification settings - Fork 3k
Lifecycle scripts silently fail on win32 if cmd.exe is not on the PATH #5267
Comments
Thanks for the bug report. This looks like a Windows-specific bug (with respect to the There was a change between To update npm on Windows, follow the instructions here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows Thanks! |
Repeating with node v0.10.33 and npm v2.1.9:
So (1) from the OP is fixed, which just leaves (2). |
Looks like (1) was fixed by 5af493e When I get a moment I'll submit a PR for (2). |
Thanks! |
Another alternative is to look at https://npm.im/win-spawn, and add the |
Using node v0.10.28 and npm v1.4.9 on Windows 8.1 x64, inside an MSYS bash shell (where the path is overridden by my .bashrc for other reasons):
package.json:
Output:
npm-debug.log from the failed (first) |npm install| above:
Similar to nodejs/node-v0.x-archive#7616, this is caused by using 'cmd' without an absolute path, and thus relying on it being present on the PATH. More frustratingly the |npm install| appears to succeed, meaning it took some time before I realised it hadn't and so looked at npm-debug.log
As such, I think:
npm/lib/utils/lifecycle.js
Lines 212 to 238 in bf761dd
...here:
npm/lib/utils/lifecycle.js
Line 207 in bf761dd
...where process.env.comspec is the full path to the default interpreter (eg: "C:\Windows\System32\cmd.exe").
The text was updated successfully, but these errors were encountered: