spago icon indicating copy to clipboard operation
spago copied to clipboard

REPL: Unsupported Node.js version 10. Required Node.js version >=12.

Open rwmorton opened this issue 2 years ago • 7 comments

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

image

To reproduce:

Screenshot from 2023-03-17 10-28-34

rwmorton avatar Mar 17 '23 10:03 rwmorton

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.

marbex7 avatar May 04 '23 20:05 marbex7

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.

marbex7 avatar May 04 '23 20:05 marbex7

Thank you, I upgraded my Ubuntu and that fixed it but will keep this in mind for next time it happens!

rwmorton avatar May 05 '23 06:05 rwmorton

This should be documented

f-f avatar Sep 20 '23 16:09 f-f

Per this site, Node 10 stopped receiving security updates as of April 30, 2021. Does this need to be documented?

JordanMartinez avatar Sep 22 '23 16:09 JordanMartinez

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

f-f avatar Sep 22 '23 17:09 f-f

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

f-f avatar Sep 22 '23 17:09 f-f