spago
spago copied to clipboard
REPL: Unsupported Node.js version 10. Required Node.js version >=12.
When running spago repl I get this error : Unsupported Node.js version 10. Required Node.js version >=12.
which node = /home/richard/.nvm/versions/node/v18.13.0/bin/node
nvm list

To reproduce:

Same problem. On my machine (also with nvm using lts) it looks like it picks up "/usr/bin/node" instead of the actual node executable in the environment.
Try this:
$ spago repl -u "--node-path ~/.nvm/versions/node/v18.14.1/bin/node"
purs repl has an option "--node-path"
and spago repl has an option -u for purs options.
This allowed me to run the spago repl in an nvm environment.
Thank you, I upgraded my Ubuntu and that fixed it but will keep this in mind for next time it happens!
This should be documented
Per this site, Node 10 stopped receiving security updates as of April 30, 2021. Does this need to be documented?
I think the issue is that purs will just use the global Node installation when starting a repl, and Spago users have little control over that
Now, I am not sure if we can do anything about this, but for example we could have a look at how nvm sets the current Node executable, and try to pass that through to purs