xxxxxxxxxx
# in package.json script tag / solucion de problema con el npm start
"scripts": {
"start": "react-scripts --openssl-legacy-provider start"
}
xxxxxxxxxx
# in package.json script tag
"scripts": {
"start": "react-scripts --openssl-legacy-provider start"
}
xxxxxxxxxx
//This error occours when you are using a newer version of node than the one the project expects
//Easy way to bypass this is to run your applications with --openssl-legacy-provider
//For example in a react project:
"scripts" : {
"start": "react-scripts --openssl-legacy-provider start",
}
//otherwise downgrade your node version
xxxxxxxxxx
Linux and Mac
export NODE_OPTIONS=--openssl-legacy-provider
Windows
set NODE_OPTIONS=--openssl-legacy-provider
Powershell
$env:NODE_OPTIONS = "--openssl-legacy-provider"
xxxxxxxxxx
In your package.json: change this line
"start": "react-scripts start"
to
"start": "react-scripts --openssl-legacy-provider start"
On Windows command prompt:
xxxxxxxxxx
set NODE_OPTIONS=--openssl-legacy-provider
xxxxxxxxxx
# In PowerShell run this line of code:
$env:NODE_OPTIONS = "--openssl-legacy-provider"
xxxxxxxxxx
# macOS, Linux and Windows Git Bash
export NODE_OPTIONS=--openssl-legacy-provider
# Windows Command Prompt:
set NODE_OPTIONS=--openssl-legacy-provider
# Windows PowerShell:
$env:NODE_OPTIONS="--openssl-legacy-provider"
Unix-like (Linux, macOS, Git bash, etc.)
xxxxxxxxxx
export NODE_OPTIONS=--openssl-legacy-provider