Node.js upgrade in WebStorm?

Greatings,

I use WebStorm with React on Linux Ubuntu 20.04LTS. At the moment I have created a rather big app in React. I would like to update the Node.js from 14 to 16. So I would install the new Node.js version in /opt. Then I would change the PATH in my .bashrc script and the path to Node in WebStorm/Project Settings/JavaScript/Node.js. Is it enough? Or shall I remove the old NPM packages and re-install then?

Thanks in advance

Andrej

3 comments
Comment actions Permalink

For the IDE itself, changing the interpreter path in settings is enough. As for existing project packages, it depends on the modules being used - some of them may stop working after changing the interpreter version. See https://stackoverflow.com/questions/41978360/side-affects-installing-node-modules-and-changing-node-js-version

0
Comment actions Permalink

Thanks for reply. I am just wondering, if I could let the existing node_modules directory after upgrade. Or is it better to remove this directory and install all packages from scratch with npm and package.json file? Would I get any problems with WebStorm in this case?

0
Comment actions Permalink

Please see my answer above. You can keep it, but it's not guaranteed to work as expected with a different version, so removing and re-installing is recommended

0

Please sign in to leave a comment.