问题描述
今天在执行
bash
npm install -g npx
报错
Command 'npm' not found, but can be installed with:
sudo apt install npm
解决方案
bash
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.