V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
beeeta
V2EX  ›  Node.js

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

  •  
  •   beeeta · 2017-08-14 10:51:31 +08:00 · 4964 次点击
    这是一个创建于 2437 天前的主题,其中的信息可能已经有所发展或是发生改变。
    9 条回复    2017-09-18 09:00:16 +08:00
    SourceMan
        1
    SourceMan  
       2017-08-14 11:15:34 +08:00
    yarn
    zhengxiaowai
        2
    zhengxiaowai  
       2017-08-14 11:19:34 +08:00
    npm install cnpm -g

    cnpm install
    ClassicOldSong
        3
    ClassicOldSong  
       2017-08-14 11:21:46 +08:00 via Android
    npm install nrm -g
    nrm use taobao
    flyingfz
        4
    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
        5
    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
        6
    maplerecall  
       2017-08-14 18:19:27 +08:00
    感觉 yarn 比 npm 快一些,不过还是得设置国内镜像
    hjdtl
        7
    hjdtl  
       2017-08-14 19:36:20 +08:00
    cnpm 有些包有问题呀?
    Debiancc
        8
    Debiancc  
       2017-08-16 12:30:50 +08:00
    cnpm 同步有些问题
    其实 npm 支持 proxy 的
    http socket5 贴上去
    gali3052
        9
    gali3052  
       2017-09-18 09:00:16 +08:00
    proxychain npm install
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1055 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 19:11 · PVG 03:11 · LAX 12:11 · JFK 15:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.