purescript / spago

🍝 PureScript package manager and build tool
BSD 3-Clause "New" or "Revised" License
793 stars 132 forks source link

npx spago init fails using git bash on windows #1305

Open Neppord opened 3 days ago

Neppord commented 3 days ago
$ npx spago init
file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:48911
                  throw util.fromLeft(step3);
                  ^

Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:761:9)
    at file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:83989:18
    at runSync (file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:48568:21)
    at run16 (file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:48761:25)
    at file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:48777:23
    at drain (file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:48595:9)
    at Object.enqueue (file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:48613:11)
    at file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:48771:31
    at __do4 (file:///D:/spago-next-test/node_modules/spago/bin/bundle.js:86427:77) {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'spawn'
}

Node.js v22.8.0

Do not know what even is failing, since the error message contains very little information.

Neppord commented 3 days ago

I also tested with Node.js v23.3.0

Neppord commented 3 days ago

This seams to be related with using git bash, it works if you run it in powershell.

It is the first time I have had this issue with node, that I can remember so far.