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

2017-08-14 10:51:31 +08:00
 beeeta
4972 次点击
所在节点    Node.js
9 条回复
SourceMan
2017-08-14 11:15:34 +08:00
yarn
zhengxiaowai
2017-08-14 11:19:34 +08:00
npm install cnpm -g

cnpm install
ClassicOldSong
2017-08-14 11:21:46 +08:00
npm install nrm -g
nrm use taobao
flyingfz
2017-08-14 12:00:22 +08:00
我优化一下。
----------
npm config set registry=https://registry.npm.taobao.org

npm install -g nrm

nrm use taobao
------------
再推荐一个模块 ,Sinopia, 但不知你有没有需求 .
chinvo
2017-08-14 12:04:14 +08:00
不要用 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-08-14 18:19:27 +08:00
感觉 yarn 比 npm 快一些,不过还是得设置国内镜像
hjdtl
2017-08-14 19:36:20 +08:00
cnpm 有些包有问题呀?
Debiancc
2017-08-16 12:30:50 +08:00
cnpm 同步有些问题
其实 npm 支持 proxy 的
http socket5 贴上去
gali3052
2017-09-18 09:00:16 +08:00
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