npm install 获取 fetchMetadata 的阶段非常慢,有什么方法可以加速呢?

2017 年 8 月 14 日
 beeeta
5840 次点击
所在节点    Node.js
9 条回复
SourceMan
2017 年 8 月 14 日
yarn
zhengxiaowai
2017 年 8 月 14 日
npm install cnpm -g

cnpm install
ClassicOldSong
2017 年 8 月 14 日
npm install nrm -g
nrm use taobao
flyingfz
2017 年 8 月 14 日
我优化一下。
----------
npm config set registry=https://registry.npm.taobao.org

npm install -g nrm

nrm use taobao
------------
再推荐一个模块 ,Sinopia, 但不知你有没有需求 .
chinvo
2017 年 8 月 14 日
不要用 cnpm

直接使用

====

npm config set registry https://registry.npm.taobao.org --global

npm config set disturl https://npm.taobao.org/dist --global

yarn config set registry https://registry.npm.taobao.org --global

yarn config set disturl https://npm.taobao.org/dist --global

====
maplerecall
2017 年 8 月 14 日
感觉 yarn 比 npm 快一些,不过还是得设置国内镜像
hjdtl
2017 年 8 月 14 日
cnpm 有些包有问题呀?
Debiancc
2017 年 8 月 16 日
cnpm 同步有些问题
其实 npm 支持 proxy 的
http socket5 贴上去
gali3052
2017 年 9 月 18 日
proxychain npm install

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/382755

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX