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.

Spawning vpython results in ENOENT on Windows

See original GitHub issue

Even though vpython is in my process.env.Path, it isn’t found until I pass in shell: true on Windows. I attached an example screenshot in git bash, but the same error occurs using cmd.

Screenshot of git bash terminal showing the issue described above

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rconde01commented, Mar 6, 2021

I have the same issue, but unless I messed something up, applying the changes in that PR didn’t fix it:

C:\Users\ContainerAdministrator\.electron_build_tools\src>e build electron:dist
Running "goma_ctl.py ensure_start" in C:\Users\ContainerAdministrator\.electron_build_tools\third_party\goma
ERROR Error: Command failed: C:\Windows\system32\cmd.exe /d /s /c "vpython goma_ctl.py ensure_start"
'vpython' is not recognized as an internal or external command,
operable program or batch file.

    at checkExecSyncError (node:child_process:690:11)
    at Object.execFileSync (node:child_process:709:15)
    at Object.ensureGomaStart [as ensure] (C:\Users\ContainerAdministrator\.electron_build_tools\src\utils\goma.js:175:16)
    at runNinja (C:\Users\ContainerAdministrator\.electron_build_tools\src\e-build.js:60:10)
    at Object.<anonymous> (C:\Users\ContainerAdministrator\.electron_build_tools\src\e-build.js:133:3)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)

actually it does change the behavior…this is before the fix:

C:\>e build electron:dist
Writing new goma.gn file C:\Users\ContainerAdministrator\.electron_build_tools\third_party\goma.gn
Downloading "https://electron-build-tools.s3-us-west-2.amazonaws.com/build-dependencies/064e0beb3c11b82b66ae4b4959e6c0cdaa2116d77c50841e4a213d4f4fb1aeaf/goma-win.zip" into C:\Users\ContainerAdministrator\.electron_build_tools\third_party\goma-win.zip
[==================================================================] 8052915/bps 100% 0.0s 
Running "goma_ctl.py ensure_start" in C:\Users\ContainerAdministrator\.electron_build_tools\third_party\goma
ERROR Error: spawnSync vpython ENOENT
    at Object.spawnSync (node:internal/child_process:1086:20)
    at spawnSync (node:child_process:676:24)
    at Object.execFileSync (node:child_process:703:15)
    at Object.ensureGomaStart [as ensure] (C:\Users\ContainerAdministrator\.electron_build_tools\src\utils\goma.js:174:16)
    at runNinja (C:\Users\ContainerAdministrator\.electron_build_tools\src\e-build.js:59:10)
    at Object.<anonymous> (C:\Users\ContainerAdministrator\.electron_build_tools\src\e-build.js:132:3)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
0reactions
rconde01commented, Mar 9, 2021

I guess I’ll open a new issue…don’t know what the process is here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

spawn python ENOENT node.js in windows - Stack Overflow
When running the code on his windows machine it gives this stacktrace. events.js:174 throw er; // Unhandled 'error' event ^ Error: spawn python...
Read more >
ENOENT error with now dev on Windows · Issue #2318 - GitHub
Running now dev results in an error saying Error: spawn yarn ENOENT Windows 10 Now ... I have a similar issue with a...
Read more >
[Solved]-spawn python ENOENT node.js in windows-node.js
Hey i had a similar problem and this did the trick , it was fixed when i added pythonPath: 'python' : const {...
Read more >
cross-spawn - npm
Node has issues when using spawn on Windows: It ignores PATHEXT; It does not support shebangs; Has problems running commands with spaces; Has ......
Read more >
Changelog — Python 3.11.1 documentation
gh-98360: Fixes multiprocessing spawning child processes on Windows from a virtual environment to ensure that child processes that also use multiprocessing to ...
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