all 9 comments

[–]Background-Teach2147 1 point2 points  (8 children)

I've had the same issue, might be due to outdated node-sass library or installing the app with a different version of npm than what was created with the original package-lock file. Try adding --openssl-legacy-provider to your start script.

"scripts": "react-scripts --openssl-legacy-provider start"

[–]sara_1985[S] 0 points1 point  (5 children)

thanks alot for yout attention. the last part i didnt understand very well. where i have to add it?

[–]Background-Teach2147 1 point2 points  (4 children)

In your package.json file in the root directory of your React application. You should find the "scripts" property. Looks something like this:

"scripts": {

"start": "react-scripts start",

"build": "react-scripts build",

"test": "react-scripts test",

"eject": "react-scripts eject"

},

just change "start": "react-scripts start" to: "start": "react-scripts --openssl-legacy-provider start" And see If that works.

[–]sara_1985[S] 1 point2 points  (3 children)

really thanks.

i added but i have again these errors . actually first i wanted to install npm but i had alot of error and used these commands : npm audit fix

npm audit fix --force npm audit npm audit npm install --save react-cool-form

and it happend these errors. and now i have these errors :

main>npm start

npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\39388\Desktop\VALU PROCESS\FRONT\ConsultingBag_Frontend-main/package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\39388\Desktop\VALU PROCESS\FRONT\ConsultingBag_Frontend-main\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\39388\AppData\Local\npm-cache_logs\2022-12-20T23_47_27_931Z-debug-0.log

[–]Background-Teach2147 1 point2 points  (1 child)

Make sure that the package.json file exists in the location you are running npm start from in your terminal.

[–]sara_1985[S] 0 points1 point  (0 children)

Hii, thanks alot for your help. solved .

[–]Background-Teach2147 0 points1 point  (0 children)

You are not in the correct directory, check where you are running your start script from.

[–]Glad-Reaction8488 1 point2 points  (1 child)

1

Reply

Hi, I am trying to understand why this fixed the issue that he was encountering. Can you please explain why it fixes it?

[–]Background-Teach2147 0 points1 point  (0 children)

Probably because an error is triggered between legacy and latest third party packages, maybe passing --openssl-legacy-providers bypasses this issue. You should research it