万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    ECONNREFUSEDエラー

    npm installすると以下のエラー

    npm ERR! code ECONNREFUSED
    npm ERR! syscall connect
    npm ERR! errno ECONNREFUSED
    npm ERR! FetchError: request to http://registry.npmjs.org/@storybook%2faddon-actions failed, reason: connect ECONNREFUSED 2606:4700::6810:1023:80
    npm ERR!     at ClientRequest.<anonymous> (/Users/shinriyo/.nvm/versions/node/v19.7.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
    npm ERR!     at ClientRequest.emit (node:events:512:28)
    npm ERR!     at Socket.socketErrorListener (node:_http_client:496:9)
    npm ERR!     at Socket.emit (node:events:524:35)
    npm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)
    npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    npm ERR!  FetchError: request to http://registry.npmjs.org/@storybook%2faddon-actions failed, reason: connect ECONNREFUSED 2606:4700::6810:1023:80
    npm ERR!     at ClientRequest.<anonymous> (/Users/shinriyo/.nvm/versions/node/v19.7.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
    npm ERR!     at ClientRequest.emit (node:events:512:28)
    npm ERR!     at Socket.socketErrorListener (node:_http_client:496:9)
    npm ERR!     at Socket.emit (node:events:524:35)
    npm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)
    npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    npm ERR!   code: 'ECONNREFUSED',
    npm ERR!   errno: 'ECONNREFUSED',
    npm ERR!   syscall: 'connect',
    npm ERR!   address: '2606:4700::6810:1023',
    npm ERR!   port: 80,
    npm ERR!   type: 'system',
    npm ERR!   requiredBy: '.'
    npm ERR! }
    npm ERR!
    npm ERR! If you are behind a proxy, please make sure that the
    npm ERR! 'proxy' config is set properly.  See: 'npm help config'
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/shinriyo/.npm/_logs/2023-03-04T15_15_23_754Z-debug-0.log

    ある記事では/etc/hostsに以下を追加するらしい

    104.16.20.35 registry.npmjs.org
    104.16.20.35 registry.npmjs.org

    それでも効果ない。

    こっち見た。 nodeを16から18にアップデートした話

    export NODE_OPTIONS=--dns-result-order=ipv4first これで行けた。 なんだこれ。