Reputation: 743
I have looked around for a solution but nothing found.
I have on my ubuntu the following versions of nodejs and npm:
nodejs -> 8.11.2
npm -> 5.6.0
When I run commands with npm I get the following warns
npm WARN npm npm does not support Node.js v10.0.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
How I can solve it? Thank you
Upvotes: 0
Views: 2818
Reputation: 124
Run a node -v
command in the directory where you need to run your program. If it returns anything other than 4,6,7,8,9 you need to use a different version of node there. Just having different versions installed doesn't mean node will switch between them to meet the dependencies of a program.
To switch between versions you can use a tool like nvm.
Once installed you can just run nvm use <desired version of node>
and you're all set.
Upvotes: 3