-
I'm trying to follow the tutorial here : When I type : It says : The file nopt-lib.js looks normal, as far as I can tell. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Not sure if the formatting is correct, it's likely erroring on Can you run |
Beta Was this translation helpful? Give feedback.
-
I typed : So I don't understand. If the latest is version 20, why does my system tell me the newest version is 12.22.9 ? (I've done the update). |
Beta Was this translation helpful? Give feedback.
OK, the Ubuntu version was lagging behind.
The fix was to install NVM (multiple versions of node.js)
Ubuntu solution
First install curl. (NOT with "sudo snap install curl", this will cause failure later. Use "sudo apt install curl").
Then you type :
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Then you close and reopen the terminal (or type the "export" etc. listed at the bottom of the shell).
nvm --help
starts by saying "Node Version Manager (v0.39.1)
Don't worry, this is the version of nvm, not the version of node.js.
Then you type :
nvm install node
This will install the latest version and make it default. I got node.js version 21.6.2.
Then the command :