我在我的windows机器上安装了以下软件:
节点: v12.18.4
纱线: 1.19.1
create-react-app: 3.4.1
我导航到文件夹c:\temp,然后尝试使用以下命令创建react应用程序:
c:\temp>create-react-app react-test --scripts-version 1.1.5
在执行上述命令时,我看到以下错误:
Creating a new React app in C:\Temp\react-test.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.19.1
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/react: unable to get local issuer certificate".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Temp\\react-test\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd C:\Temp\react-test has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.有没有人可以通过提供指导来帮助我解决这个问题
发布于 2020-11-12 22:04:35
关闭yarn/npm上的strict-ssl配置,然后重试
yarn config set "strict-ssl" false -g或
npm config set "strict-ssl" false -ghttps://stackoverflow.com/questions/64125554
复制相似问题