question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: spawn npm ENOENT issue on Windows

See original GitHub issue

I’ve installed electron-build (3.1.1) on Windows 8.1 and Windows 10 to be able to code-sign my application in Windows, but I keep on encountering this issue:

Installing app dependencies for arch ia32 to C:\Users\IEUser\Desktop\client\app
Error: spawn npm ENOENT
    at exports._errnoException (util.js:890:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (node.js:383:13)
    at process._tickCallback (node.js:407:11)

After modifying the util.ts file to use “npm.cmd” instead of “npm”, it looks like it runs now.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kkaproncommented, Apr 8, 2016

@ykim I had the same problem on Windows 7. Modifying the util.ts file works, but I think that the cleaner way to handle this issue for now is to export environment variable. In my project (I’m using electron-builder in programmatic way) I just did: process.env.npm_execpath - "C:\\Program Files\\nodejs\\node_modules\\npm";

0reactions
develarcommented, Apr 9, 2016

@kkapron #272 fixed. Anything else?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: spawn ENOENT on Windows - node.js - Stack Overflow
I solved same problem using cross-spawn. It allows me to spawn command on both windows and mac os as one common command.
Read more >
Error: spawn npm ENOENT (Windows) · Issue #485 - GitHub
Any ideas? It is erroring out as it tries to spawn npm in a child process in order to fetch versions. I am...
Read more >
Common errors | npm Docs
The error Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm' on Windows 7 is a consequence of joyent/node#8141, and is an issue with the Node ...
Read more >
Node.js Child Process ENOENT Error on Windows (title for ...
Turns out this ENOENT error means that it can't execute the command. eg. Jekyll doesn't resolve to an executable file. When we run...
Read more >
Error: spawn node_modules/webpack/bin/webpack.js ENOENT
Hi I am in windows 10 when I issue the command npm run dev. it shows error. Error: spawn node_modules/webpack/bin/webpack.js ENOENT.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found