简体   繁体   中英

node version vs npm outdated

earlier this year I installed node 10.15.3 then I updated npm to 6.9.0. Since then I have encountered some anomalies and want to rollback npm.

I ran the following commands

npm install npm@6.4.1
npm --version
#6.4.1
node --version
#10.15.3

Then I an npm outdated -g and got this result

在此输入图像描述

I tried running npm install node@10.15.3 which threw an exception. Then I tried repairing 10.15.3 and rebooting the machine.

Why is npm outdated -g reporting a lower version than node --version ?

My resolution was

  1. uninstall nodejs 10.15.3 via the msi
  2. delete [user]/appdata/roaming/npm* I had npm and npm-cahche, so I deleted both
  3. reboot machine
  4. install nodejs 10.15.3
  5. run npm outdated -g

no packages outdated. So it looked like the roaming data, and/or cache, was the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM