4

I tried to create React app in VS Code by using below code. I got this error "npm ERR! code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC" Node version: v14.18.1 npm version: 8.1.0 OS: windows 10 VS code: 1.16.0

PS D:\React-Projects> npx create-react-app first-app

Creating a new React app in D:\React-Projects\first-app.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC npm ERR! 10796:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677: npm ERR!

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\bizwe\AppData\Local\npm-cache_logs\2021-10-16T08_13_20_686Z-debug.log

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... node_modules Deleting generated file... package.json Deleting first-app/ from D:\React-Projects Done.

I tried all solutions given in stack overflow, but none of them is worked, Anybody help me please.

Sagar C
  • 41
  • 1
  • 4
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 16 '21 at 18:35

5 Answers5

1

Type npm set strict-ssl false in the terminal. I have tried everything found over internet. Nothing worked until this. But watch out since this has security issue.

Read this for further info : Fixing ssl certficate error

Dinith Rukshan Kumara
  • 638
  • 2
  • 10
  • 19
0

The Fix:-

Just change the settings of the windows defender firewall.

It applies to all operating systems like windows, Linux, MacOS. Here is the sample in windows for checking window security image

Make sure that in window security all are checked

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
npm ERR! 7828:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\CODER\AppData\Local\npm-cache\_logs\2022-08-29T15_40_10_455Z-debug-0.log
csgeek
  • 711
  • 6
  • 15
0

solution to the problem

It works in my case. There are some window security issues. Please make sure that you have all green checks on the window security as well as the window firewall.

Liki Crus
  • 1,901
  • 5
  • 16
  • 27
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/32747735) – nullptr Sep 24 '22 at 09:51
-1

I hope this could help. I use a MAC. i found out today that i was on a 3G network. I switched to 4G, ran my network speed and got to at least 4mb per seconds download speed. It worked when i tried again, maybe you can do that. I got a proxy error with 3G.

Follow the docs

npm create-react-app mp-app

Johnson Fashanu
  • 897
  • 8
  • 6
-2

I had the same problem and I solved it by deleting my SSH key from Github (in my case) and from my machine, then I generated a new SSH key.

Adding a new SSH key to your GitHub account

logic_h
  • 1
  • 1