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
これで行けた。
なんだこれ。