我尝试在Windows 10上安装expo CLI,但失败并出现以下错误。
C:\projectreact>npm install expo-cli --global
npm ERR! code EACCES
npm ERR! errno EACCES
npm ERR! FetchError: request to https://registry.npmjs.org/expo-cli failed, reason: connect EACCES 104.16.26.35:443
npm ERR! at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR! at ClientRequest.emit (events.js:223:5)
npm ERR! at TLSSocket.socketErrorListener (_http_client.js:406:9)
npm ERR! at TLSSocket.emit (events.js:223:5)
npm ERR! at emitErrorNT (internal/streams/destroy.js:92:8)
npm ERR! at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
npm ERR! at processTicksAndRejections (internal/process/task_queues.js:81:21)
npm ERR! FetchError: request to https://registry.npmjs.org/expo-cli failed, reason: connect EACCES 104.16.26.35:443
由于某些原因,此安装可在Windows 7上运行。
答案 0 :(得分:0)
尝试关闭防火墙和防病毒软件。有同样的问题,这对我有用。