我正在使用 React Native 和 Expo 开发移动应用程序,两天后一切正常,然后当我运行
npm start
时出现这样的错误
FetchError: request to https://api.expo.dev/v2/sdks/50.0.0/native-modules failed, reason: unable to verify the first certificate
at ClientRequest.<anonymous> (F:\AminosApps\node_modules\node-fetch\lib\index.js:1501:11)
at ClientRequest.emit (node:events:518:28)
at TLSSocket.socketErrorListener (node:_http_client:495:9)
at TLSSocket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
我确实用
npm i -g expo-cli
重新安装了expo-cli,但安装过程卡在了中间。
我曾经遇到过同样的问题,我通过在我使用的防病毒软件中授予SSL访问权限来解决它。尝试重置您的 SSL 保护器设置。
然后删除package-lock.json和node_modules并重新启动
npm install
然后重新启动npm start