beeeta
V2EX  ›  Node.js

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

  •  
  •   beeeta · Aug 14, 2017 · 5858 views
    This topic created in 3215 days ago, the information mentioned may be changed or developed.
    9 replies    2017-09-18 09:00:16 +08:00
    SourceMan
        1
    SourceMan  
       Aug 14, 2017
    yarn
    zhengxiaowai
        2
    zhengxiaowai  
       Aug 14, 2017
    npm install cnpm -g

    cnpm install
    ClassicOldSong
        3
    ClassicOldSong  
       Aug 14, 2017 via Android
    npm install nrm -g
    nrm use taobao
    flyingfz
        4
    flyingfz  
       Aug 14, 2017
    我优化一下。
    ----------
    npm config set registry=https://registry.npm.taobao.org

    npm install -g nrm

    nrm use taobao
    ------------
    再推荐一个模块 ,Sinopia, 但不知你有没有需求 .
    chinvo
        5
    chinvo  
       Aug 14, 2017
    不要用 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  
       Aug 14, 2017
    感觉 yarn 比 npm 快一些,不过还是得设置国内镜像
    hjdtl
        7
    hjdtl  
       Aug 14, 2017
    cnpm 有些包有问题呀?
    Debiancc
        8
    Debiancc  
       Aug 16, 2017
    cnpm 同步有些问题
    其实 npm 支持 proxy 的
    http socket5 贴上去
    gali3052
        9
    gali3052  
       Sep 18, 2017
    proxychain npm install
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5536 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 93c8b4a0 · 46ms · UTC 08:40 · PVG 16:40 · LAX 01:40 · JFK 04:40
    ♥ Do have faith in what you're doing.