NVM-无法安装expo依赖项

问题描述 投票:0回答:1

我正在使用nvm在4.4.3和12.14.1节点版本之间切换。在我切换到版本12.14.1并尝试按here所述安装expo并运行react-native项目之后。

npm install -g expo-cli
expo init
npm start

但是运行npm start时出现以下错误。

npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz failed, reason: 
self signed certificate in certificate chain

我遵循了here所述的步骤。

所以我运行了以下命令。

npm config set registry http://registry.npmjs.org/

但是我仍然遇到相同的错误。请帮助!

而且我也不想像规定那样禁用strict-ssl

npm set strict-ssl false
node.js reactjs react-native npm nvm
1个回答
0
投票

使用以下命令禁用严格的ssl模式,您将不会收到错误:

npm set strict-ssl false
© www.soinside.com 2019 - 2024. All rights reserved.