zkdocs icon indicating copy to clipboard operation
zkdocs copied to clipboard

Start Local Client Fails on Node 18+

Open un-focused opened this issue 2 years ago • 3 comments

yarn start-local-client
Starting the development server...

/Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/react-scripts/scripts/start.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/webpack/lib/NormalModule.js:417:16)
    at /Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/webpack/lib/NormalModule.js:452:10
    at /Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/webpack/lib/NormalModule.js:323:13
    at /Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /Users/unfocused/Documents/Git Folders/Projects/zkdocs/node_modules/react-scripts/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'
}

Node.js v18.1.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

un-focused avatar Jul 26 '23 02:07 un-focused

The "fix" is to enable the legacy provider: export NODE_OPTIONS=--openssl-legacy-provider

un-focused avatar Jul 26 '23 02:07 un-focused

https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

un-focused avatar Jul 26 '23 02:07 un-focused

From https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

In Node.js v17, the Node.js developers closed a security hole in the SSL provider. This fix was a breaking change that corresponded with similar breaking changes in the SSL packages in NPM. When you attempt to use SSL in Node.js v17 or later without also upgrading those SSL packages in your package.json, then you will see this error.

We need to upgrade our dependencies to newer versions of the SSL packages.

un-focused avatar Jul 26 '23 02:07 un-focused