V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
allele
V2EX  ›  程序员

M1 mac 下 npm 突然无法做任何事情?

  •  
  •   allele · 2021-01-22 13:51:31 +08:00 · 2335 次点击
    这是一个创建于 1385 天前的主题,其中的信息可能已经有所发展或是发生改变。
    • 电脑:M1 mbp
    • 系统:Big Sur 11.1

    之前一直好好的,突然无法打包了。后来发现npm install也不行了,甚至npm config也不行。一直卡在npm:load这一状态。

    ➜  ~ npm config get registry --verbose
    npm verb cli [
    npm verb cli   '/opt/homebrew/Cellar/node/15.6.0/bin/node',
    npm verb cli   '/opt/homebrew/bin/npm',
    npm verb cli   'config',
    npm verb cli   'get',
    npm verb cli   'registry',
    npm verb cli   '--verbose'
    npm verb cli ]
    npm info using [email protected]
    npm info using [email protected]
    npm timing config:load:defaults Completed in 1ms
    npm timing config:load:file:/opt/homebrew/lib/node_modules/npm/npmrc Completed in 1ms
    npm timing config:load:builtin Completed in 1ms
    npm timing config:load:cli Completed in 0ms
    npm timing config:load:env Completed in 0ms
    npm timing config:load:project Completed in 0ms
    npm timing config:load:file:/Users/allele/.npmrc Completed in 0ms
    npm timing config:load:user Completed in 0ms
    npm timing config:load:file:/opt/homebrew/etc/npmrc Completed in 0ms
    npm timing config:load:global Completed in 0ms
    npm timing config:load:cafile Completed in 0ms
    npm timing config:load:validate Completed in 0ms
    npm timing config:load:setUserAgent Completed in 0ms
    npm timing config:load:setEnvs Completed in 0ms
    npm timing config:load Completed in 3ms
    npm verb npm-session dbfc4053986fe777
    npm timing npm:load Completed in 7ms
    ⸨░░░░░░░░░░░░░░░░░░⸩ ⠋ : timing npm:load Completed in 7ms
    

    有人遇到过相似的问题么😩


    用 homebrew 重新安装过一边 node 也还是不行。

    6 条回复    2021-01-25 16:21:34 +08:00
    uselessVisitor
        1
    uselessVisitor  
       2021-01-22 14:54:57 +08:00
    重启试一下?
    runliuv
        2
    runliuv  
       2021-01-22 15:15:33 +08:00
    没有 M1 机器,就看看。
    whitehack
        3
    whitehack  
       2021-01-22 15:53:37 +08:00
    借个 M1 我帮你解决
    ytll21
        4
    ytll21  
       2021-01-22 15:55:34 +08:00
    装 nvm 试试
    12101111
        5
    12101111  
       2021-01-22 16:19:41 +08:00   ❤️ 1
    苹果的签名验证卡住了吧,开全局代理看看
    allele
        6
    allele  
    OP
       2021-01-25 16:21:34 +08:00
    @12101111 最后试了很久发现确实是网络问题。但是它的报错(甚至不报错)就让我很困惑。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1116 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:46 · PVG 06:46 · LAX 14:46 · JFK 17:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.