Packages that were previously installed globally through npm after nvm switching versions are invalidated

packages previously installed globally through npm fail when nvm changes versions

cnpm no damn commands can be used,

how to solve it?

Feb.27,2021

for example, if you previously used node v6.10.0 and have related global packages, now you want to use v8.10.0:
if you install with nvm install v8.10.0 , V8 does not have V6-related global packages, you can use -- reinstall-packages-from= < version > install

nvm install v8.10.0 --reinstall-packages-from=v6.10.0
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b95528-2e4b9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b95528-2e4b9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?