安装cnpm错误:"registry=https:\registry.npm.taobao.org" as it does not contain a package.json file.

"registry=https:\registry.npm.taobao.org" as it does not contain a package.json file.

npm install -g cnpm registry=https://registry.npm.taobao.org

npm ERR! code ENOLOCAL
npm ERR! Could not install from "registry=https:\registry.npm.taobao.org" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:

本想安装一个cnpm的,结果一直报错npm ERR! code ENOLOCAL,"registry=https:\registry.npm.taobao.org" as it does not contain a package.json file.

npm install -g cnpm --registry=https://registry.npm.taobao.org

到最后发现只要清空一下缓存就好了!

npm cache clean --force

再输入安装命令就可以了

npm install -g cnpm --registry=https://registry.npm.taobao.org
posted @ 2021-01-22 17:12  进击的小熙  阅读(2017)  评论(0编辑  收藏  举报