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

安装cnpm错误:

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

npm ERR! code ENOLOCAL
npm ERR! Could not install from "registry=https: egistry.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错误:"registry=https:
egistry.npm.taobao.org" as it does not contain a package.json file.

本想安装一个cnpm的,结果一直报错npm ERR! code ENOLOCAL,"registry=https: egistry.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