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.

spawn C:\Windows\system32\cmd.exe ENOENT when sourcedir is not a directory

See original GitHub issue

Please describe your issue: Hi, i’m actualy doing a local chat, using socket.io & electron. Everythings works fine, but when i try to compile my app (client side (obviously) ) electron-packager give me an error.

Console output when you run electron-packager with the environment variable DEBUG=electron-packager. Please include the stack trace if one exists.

C:\Users\alexr\Documents\prog\js\Shou>electron-packager ./client/main.js app.exe --platform=win32 --arch=ia32 --electron-version=1.4.15
Packaging app for platform win32 ia32 using electron v1.4.15
spawn C:\Windows\system32\cmd.exe ENOENT

``

What command line arguments are you passing? Alternatively, if you are using the API, what parameters are you passing to the packager() function?

./client/main.js app.exe --platform=win32 --arch=ia32 --electron-version=1.4.15

I haven’t use the API

What i did First i check for this path, and well i get cmd.exe ! Then i check for sys variables, and i get ComSpec = C:\Windows\system32\cmd.exe. I don’t know what to do next…

Computer info OS: WIndows 10 node: 7.4.0 npm: 4.0.5

Thanks !

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maleptcommented, Feb 7, 2017

Oh, I see what the problem is. You set the first argument as the path to the main script. Per the documentation, the first argument is sourcedir:

sourcedir          the base directory of the application source
0reactions
Akronaecommented, Feb 7, 2017

sh*t, sorry i skipped the 1st grade…

Read more comments on GitHub >

github_iconTop Results From Across the Web

spawn C:\Windows\system32\cmd.exe ENOENT when ...
spawn C:\Windows\system32\cmd.exe ENOENT when sourcedir is not a directory #582 ... sourcedir the base directory of the application source ...
Read more >
Problem with npm start (error : spawn cmd ENOENT)
Navigate to your project folder and type this command >>> ... For all those Who've come to this problem from react scripts not...
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 Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found