npm设置镜像站

淘宝镜像:http://npm.taobao.org/

  • 通过config命令

    config set registrynpm info underscore```
    1
    2
    3
    (如果上面配置正确这个命令会有字符串response)
    * 命令行指定
    ```npm --registry https://registry.npm.taobao.org info underscore
  • 编辑 ~/.npmrc,加入下面内容:
    registry = https://registry.npm.taobao.org
    (推荐使用,一次配置,一劳永逸。)

Ethan wechat
欢迎扫一扫关注~
坚持原创技术分享,您的支持将鼓励我继续创作!