'grunt create-sim' fails on Windows with "Error: spawn EINVAL" #48
fgamador
started this conversation in
SceneryStack
Replies: 2 comments 2 replies
-
I added Perennial issue #359 for this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for catching this and proposing a fix, @fgamador! This was a wonderful contribution. Looks like it touched a few other places in the code and @zepumph needed to track it down. Would you be willing to share what brought you to SceneryStack? Feel free to message the chat or DM me (same name) on Slack/Matrix as well if you prefer. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using a recent version of Node on Windows, 'grunt create-sim' fails with "Error: spawn EINVAL". I found that this is a known issue with recent versions of Node and can be fixed by adding
shell: true
to the options passed tochild_process.spawn
in perennial/js/common/execute.js (line 52). I tried it, and it works. I can submit a pull request if you'd like.C:\Users\franz\Dev\NodeProjects\phetsims\perennial (main -> origin) ([email protected])
λ grunt create-sim --repo=my-first-sim --author="Franz Amador"
Running "create-sim" task
Greetings Franz Amador!
creating sim with repository name my-first-sim
wrote ../my-first-sim/.gitignore
[...]
wrote ../my-first-sim/tsconfig.json
info: npm update in ../my-first-sim
Fatal error: Perennial task failed:
Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:421:11)
at Object.spawn (node:child_process:761:9)
at C:\Users\franz\Dev\NodeProjects\phetsims\perennial\js\common\execute.js:52:40
at new Promise ()
at module.exports (C:\Users\franz\Dev\NodeProjects\phetsims\perennial\js\common\execute.js:45:10)
at C:\Users\franz\Dev\NodeProjects\phetsims\perennial\js\common\npmUpdateDirectory.js:28:11
at C:\Users\franz\Dev\NodeProjects\phetsims\perennial\node_modules\async-mutex\lib\Mutex.js:23:66
at Semaphore. (C:\Users\franz\Dev\NodeProjects\phetsims\perennial\node_modules\async-mutex\lib\Semaphore.js:37:46)
at step (C:\Users\franz\Dev\NodeProjects\phetsims\perennial\node_modules\tslib\tslib.js:195:27)
at Object.next (C:\Users\franz\Dev\NodeProjects\phetsims\perennial\node_modules\tslib\tslib.js:176:57)
Full Error details:
Error: spawn EINVAL
Beta Was this translation helpful? Give feedback.
All reactions