使用淘宝镜像安装cnpm,使用命令:$ npm install cnpm -g --registry=https://registry.npm.taobao.org之后输入cnpm -v,显示cnpm不是内部或外部命令,也不是可运行命令或批处理文件node -v 5.0.0 npm-v 3.3.6应该不是node和npm的问题,想请教一下这是什么原因呢?怎么解决?要使用less和gulp,安装cnpm很有必要的..
闭关修行中......
Just configure the taobao image registry directly for npm. It is not necessary to install cnpm
npm
cnpm
npm config set registry https://registry.npm.taobao.org
Then use npm install gulp less --save-dev directly to get the package from the taobao image
npm install gulp less --save-dev
Open
C:\Users(用户)\你的用户名\.npmrc
Change this file to
prefix=C:\Program Files\nodejs\node_modules cache=C:\Program Files\nodejs\node_cache registry = http://registry.cnpmjs.org
The first two are the two folders under the node installation path
Just configure the taobao image registry directly for
npm
. It is not necessary to installcnpm
Then use
npm install gulp less --save-dev
directly to get the package from the taobao imageOpen
Change this file
to
The first two are the two folders under the node installation path