我正在尝试将express 4.x卸载到3.x.以下是我目前在终端中看到的内容:
npm uninstall express
npm WARN uninstall not installed in /home/johnmlocklear/node_modules: "express"
npm uninstall -g express
npm WARN uninstall not installed in /usr/local/lib/node_modules: "express"
express -V
4.2.0
ls .npm/express
3.0.0 4.2.0 4.4.4
which express
/usr/local/bin/express
ls -lh /usr/local/bin/express
/usr/local/bin/express -> ../lib/node_modules/express-generator/bin/express
所以我想我很困惑为什么npm在我的主文件夹中查找快递。此外,如果我使用-g选项尝试此操作,我会收到相同的错误消息。我想要完全安装快递,我可以重新安装版本3,还是有办法选择版本3作为活动版本?
答案 0 :(得分:1)
试试这个:
npm install -g express@"3.x.x"