Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Node 20 LTS #73

Open
Toharawk opened this issue Dec 23, 2023 · 1 comment
Open

Compatibility with Node 20 LTS #73

Toharawk opened this issue Dec 23, 2023 · 1 comment

Comments

@Toharawk
Copy link

Could we get an update to run the theme with the latest node LTS? Thank you for considering the request.

Error:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/Users/kzvb/Documents/_react/abrechnungsmappe/dist/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/kzvb/Documents/_react/abrechnungsmappe/dist/node_modules/webpack/lib/NormalModule.js:417:16)
    at /Users/kzvb/Documents/_react/abrechnungsmappe/dist/node_modules/webpack/lib/NormalModule.js:452:10
    at /Users/kzvb/Documents/_react/abrechnungsmappe/dist/node_modules/webpack/lib/NormalModule.js:323:13
    at /Users/kzvb/Documents/_react/abrechnungsmappe/dist/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/kzvb/Documents/_react/abrechnungsmappe/dist/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/kzvb/Documents/_react/abrechnungsmappe/dist/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /Users/kzvb/Documents/_react/abrechnungsmappe/dist/node_modules/babel-loader/lib/index.js:59:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
@walterwakefield
Copy link

walterwakefield commented Jun 24, 2024

Hi!

I finally finally got this working.

Step 1) Run commans:

On Unix-like (Linux, macOS, Git bash, etc.):
export NODE_OPTIONS=--openssl-legacy-provider

On Windows command prompt:
set NODE_OPTIONS=--openssl-legacy-provider

On PowerShell:
$env:NODE_OPTIONS = "--openssl-legacy-provider"

Step 2) Delete package.lock.json

Step 3) In package.json change "scripts" section to:

"scripts": {
"crabuild": "react-scripts --openssl-legacy-provider build",
"craeject": "react-scripts --openssl-legacy-provider eject",
"crastart": "react-scripts --openssl-legacy-provider start",
"cratest": "react-scripts --openssl-legacy-provider test",
"build": "wptheme-scripts --openssl-legacy-provider build",
"start": "wptheme-scripts --openssl-legacy-providerstart",
"wpbuild": "wptheme-scripts --openssl-legacy-provider wpbuild",
"wpstart": "wptheme-scripts --openssl-legacy-provider wpstart"
},
Step 4) If the second time, we get a 8090 port in use error, find out which port by using command:
sudo lsof -i :8090

then kill the process by using PID.

sudo kill -9

Then restart by using command sudo npm run wpstart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants