发生意外错误:“https://registry.yarnpkg.com/react: unable to get local issuer certificate” while create

编程入门 行业动态 更新时间:2024-10-05 09:24:34

<a href=https://www.elefans.com/category/jswz/34/1753745.html style=发生意外错误:“https://registry.yarnpkg.com/react: unable to get local issuer certificate” while create"/>

发生意外错误:“https://registry.yarnpkg.com/react: unable to get local issuer certificate” while create

我的 Windows 机器上安装了以下内容:

节点:v12.18.4

纱线:1.19.1

创建反应应用程序:3.4.1

我导航到文件夹 c:emp,然后尝试使用以下命令创建 React 应用程序:

c: emp>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: ": 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  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.

任何人都可以通过提供解决此问题的指导来帮助我

回答如下:

关闭 yarn/npm 配置上的 strict-ssl,然后重试

yarn config set "strict-ssl" false -g

npm config set "strict-ssl" false -g

更多推荐

发生意外错误:“https://registry.yarnpkg.com/react: unable to get local issuer certifica

本文发布于:2024-05-30 22:42:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1771003.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发生意外   错误   registry   yarnpkg   react

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!