We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config
$ npm config set registry http://r.cnpmjs.org
$ npm --registry http://r.cnpmjs.org install koa
~/.npmrc
registry = http://r.cnpmjs.org
$ npm config set strict-ssl false # 关闭npm的https $ npm config set proxy=http://ip:port # 设置npm获取的代理服务器地址 $ npm config delete http-proxy # 清除npm的http代理 $ npm config delete https-proxy # 清除npm的https代理 $ npm install -g koa --proxy http://ip:port # 临时使用代理
$ npm install -g cnpm --registry=http://r.cnpmjs.org
或者
$ alias cnpm="npm --registry=http://r.cnpmjs.org \ --cache=$HOME/.npm/.cache/cnpm \ --disturl=http://cnpmjs.org/dist \ --userconfig=$HOME/.cnpmrc" #或者把该设置放到shell配置文件里 .bashrc or .zshrc $ echo '\n#alias for cnpm\nalias cnpm="npm --registry=http://r.cnpmjs.org \ --cache=$HOME/.npm/.cache/cnpm \ --disturl=http://cnpmjs.org/dist \ --userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc
$ cnpm install [name] # 安装 $ cnpm sync connect # 同步 $ open http://cnpmjs.org/sync/connect # 通过web浏览器查看 $ cnpm publish [name] $ cnpm unpublish [name] $ cnpm info cnpm
The text was updated successfully, but these errors were encountered:
No branches or pull requests
NPM镜像配置
config
配置$ npm config set registry http://r.cnpmjs.org
~/.npmrc
CNPM——node包管理器
安装
或者
使用
The text was updated successfully, but these errors were encountered: