Skip to content

前端包管理工具常见问题汇总 #81

Description

@pokerLife

🌍 npm、yarn查看和切换源:

最近一直遇到yarn install、npm install 安装失败问题,根据报错内容里面有淘宝镜像地址确定应该是这里问题,换成原来的npm源还是不管用,最后发现yarn.lock文件写死了包的请求地址。。。

  • npm原镜像地址
https://registry.npmjs.org/
  • 查看和切换
npm config get registry  // 查看npm当前镜像源

npm config set registry https://registry.npm.taobao.org/  // 设置npm镜像源为淘宝镜像

yarn config get registry  // 查看yarn当前镜像源

yarn config set registry https://registry.npm.taobao.org/  // 设置yarn镜像源为淘宝镜像

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions