V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xummerj
V2EX  ›  问与答

大家用 NPM 有没有出现这样的,求大神

  •  
  •   xummerj · 2015-07-21 09:21:58 +08:00 · 5590 次点击
    这是一个创建于 3174 天前的主题,其中的信息可能已经有所发展或是发生改变。

    已经
    npm install -g cnpm --registry=https://registry.npm.taobao.org

    C:\WINDOWS\system32>cnpm config ls -l
    ; cli configs
    cache = "C:\\Users\\xummer\\.cnpm"
    disturl = "https://npm.taobao.org/mirrors/node"
    long = true
    node-gyp = "C:\\Users\\xummer\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_m
    odules\\pangyp\\bin\\node-gyp.js"
    registry = "https://registry.npm.taobao.org/"
    user-agent = "npm/2.13.2 node/v0.12.7 win32 x64"
    userconfig = "C:\\Users\\xummer\\.cnpmrc"
    
    ; userconfig C:\Users\xummer\.cnpmrc
    email = ""
    
    
    C:\WINDOWS\system32>cnpm install -g ionic
    npm ERR! fetch failed https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz
    
    npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
    npm ERR! tar.unpack untar error C:\Users\xummer\AppData\Local\Temp\npm-5904-a2cf
    e16d\registry.npmjs.org\colors\-\colors-1.0.3.tgz
    

    出错包都是不一定的
    就是使用淘宝镜象等配置,在下载依赖的时候还是用的https://registry.npmjs.org/这个要怎么弄?

    5 条回复    2015-07-29 22:42:29 +08:00
    learnshare
        1
    learnshare  
       2015-07-21 09:50:27 +08:00
    看起来并没有从 taobao 下载?
    xummerj
        2
    xummerj  
    OP
       2015-07-21 09:58:25 +08:00
    @learnshare ionic 包从taobao下了,就是其它依赖包没有
    airyland
        3
    airyland  
       2015-07-21 10:23:43 +08:00
    没有遇到过,不过fetch failed时加个代理一般都能解决。
    learnshare
        4
    learnshare  
       2015-07-21 10:33:39 +08:00
    @xummerj 还是用 npmjs.com 的源,挂代理吧

    我用了一段时间 cnpm,虽然速度不错,但遇到不少问题
    hienchu
        5
    hienchu  
       2015-07-29 22:42:29 +08:00
    遇到了相同的问题,不知道是不是npm 2.13的bug
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3052 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 11:01 · PVG 19:01 · LAX 04:01 · JFK 07:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.