wasp
wasp copied to clipboard
Improve error message when correct version of `npm` isn't in `PATH`
If a user starts a wasp command and npm isn't in PATH, this is the error they get:
[ Wasp ] Starting npm installwasp-bin: npm: streamingProcess: exec: invalid argument (Bad file descriptor)
We should check if npm is in PATH and give our users a meaningful message if we don't find it (like we do when we don't find node) (or if it is too old).
Thanks @Rotemoyal for letting us know: https://github.com/wasp-lang/wasp/issues/1980#issuecomment-2183980522
Related: #921 <- hm so we are arleady chekcing the npm version? Related: #2085
Currently, as described here https://github.com/wasp-lang/wasp/issues/2085#issuecomment-2276137271, Wasp doens't work for npm 9.5.0 which is more than two years old version of npm. But, people still hit this. So in this case it would be great if we had a check that error or warned users that their npm version is too old, and we would set it to > npm 9.5.0 .
Yes, people keep hitting this and often spiral off trying to fix it. We need to do something about it.