NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源

07-21 1132阅读

NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源

文章目录

  • NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源
  • 1. 查看默认的下载源
    • 1. npm
    • 2. yarn
    • 3. pnpm
    • 2. 设置最新的淘宝镜像地址
      • 1. npm
      • 2. yarn
      • 3. pnpm

        1. 查看默认的下载源

        1. npm

        C:\Users\jinshengyuan>npm get registry
        https://registry.npmjs.org/
        

        2. yarn

        C:\Users\jinshengyuan>yarn config get registry
        https://registry.yarnpkg.com
        

        3. pnpm

        C:\Users\jinshengyuan>pnpm get registry
        https://registry.npmjs.org/
        

        2. 设置最新的淘宝镜像地址

        淘宝镜像源地址由 https://registry.npm.taobao.org 已替换为https://registry.npmmirror.com

        NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源
        (图片来源网络,侵删)

        1. npm

        # 设置
        C:\Users\jinshengyuan>npm config set registry https://registry.npmmirror.com
        # 查看
        C:\Users\jinshengyuan>npm get registry
        https://registry.npmmirror.com/
        

        2. yarn

        # 设置
        C:\Users\jinshengyuan>yarn config set registry https://registry.npmmirror.com
        yarn config v1.22.22
        success Set "registry" to "https://registry.npmmirror.com".
        Done in 0.03s.
        # 查看
        C:\Users\jinshengyuan>yarn config get registry
        https://registry.npmmirror.com
        

        3. pnpm

        # 设置
        C:\Users\jinshengyuan>pnpm config set registry https://registry.npmmirror.com
        # 查看
        C:\Users\jinshengyuan>pnpm get registry
        https://registry.npmmirror.com
        
VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]