本文转自:https://blog.csdn.net/qq919694688/article/details/80912207

放弃使用cnpm,使用yarn
1.删除node_modules (不需要删除project目录重新ng new)
  1. 安装yarn:npm install --global yarn
  2. 配置仓库:
    1. npm config set registry http://registry.npmjs.org/
    2. yarn config set registry https://registry.yarnpkg.com/
  3. 科学上网:
    1. npm config set registry https://registry.npm.taobao.org
    2. yarn config set registry https://registry.npm.taobao.org
  4. 新建项目:ng new project --skip-install
  5. 导入依赖:进入project目录运行 yarn install

--------------------- 本文来自 Razera 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/qq919694688/article/details/80912207?utm_source=copy 

 

相关文章:

  • 2022-12-23
  • 2021-06-14
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2021-07-08
  • 2021-04-26
  • 2021-04-14
  • 2021-07-30
  • 2021-04-02
  • 2022-12-23
  • 2021-05-30
相关资源
相似解决方案