本文转自:https://blog.****.net/qq919694688/article/details/80912207
放弃使用cnpm,使用yarn
1.删除node_modules (不需要删除project目录重新ng new)
- 安装yarn:npm install --global yarn
- 配置仓库:
- npm config set registry http://registry.npmjs.org/
- yarn config set registry https://registry.yarnpkg.com/
- ***:
- npm config set registry https://registry.npm.taobao.org
- yarn config set registry https://registry.npm.taobao.org
- 新建项目:ng new project --skip-install
- 导入依赖:进入project目录运行 yarn install
--------------------- 本文来自 Razera 的**** 博客 ,全文地址请点击:https://blog.****.net/qq919694688/article/details/80912207?utm_source=copy