How can I downgrade Node using NPM?

Viewed 31994

I need to downgrade my Node version from 10.x to 8.12. It appears I should be able to run this command:

$ npm install node@8.12

That runs, says removed 1 package, updates 1 package...

But then I check version and it keeps returning my old version:

$ node -v

v10.11.0

Am I doing something wrong or misunderstanding the commands/process?

1 Answers

I am sheepishly answering my own question.

The issue was that node was a global install. Therefore, I needed to install the lower version globally ala the -g option:

$ npm install -g node@8.12

Related