I have the following installed on my windows machine:
Node : v12.18.4
yarn : 1.19.1
create-react-app: 3.4.1
I navigated to the folder c:\temp and then tried to create react app using the following command:
c:\temp>create-react-app react-test --scripts-version 1.1.5
On executing the above command I see the following error:
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.
Can anyone help me here by providing their guidance to fix this issue
Turn off the strict-ssl on yarn/npm config, and try again
yarn config set "strict-ssl" false -g
or
npm config set "strict-ssl" false -g
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With