Fixing Mismatched npm Package Versions: Local vs Registry
List installed packages¶
npm ls <package>
alias: list
View registry info¶
npm view <package> version
alias: aliases: info, show, v
Clears packages cache¶
npm cache clean --force
Remove a package¶
npm uninstall <package>
aliases: unlink, remove, rm, r, un
Delete node_modules/¶
rm -rf node_modules/
Delete package-lock.json¶
rm package-lock.json
Install a package¶
npm install <package>
aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall