问题描述
今天在执行
npm install -g npx
报错
Command 'npm' not found, but can be installed with:
sudo apt install npm
解决方案
sudo apt-get remove npm
sudo apt-get remove nodejs-legacy
sudo apt-get remove nodejs
sudo rm /usr/bin/node
sudo apt-get install nodejs
sudo apt-get install nodejs-legacy
sudo apt-get install npm.

文章讲述了用户在尝试使用`npminstallgnpx`时遇到npmcommandnotfound的错误,给出了在Ubuntu系统中通过删除并重新安装Node.js和npm的步骤来解决问题的方法。

1万+

被折叠的 条评论
为什么被折叠?



