nextjs-gcp-storage icon indicating copy to clipboard operation
nextjs-gcp-storage copied to clipboard

Issue with Node 17

Open wittwerch opened this issue 3 years ago • 1 comments

If you try to run the example with Node 17

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at module.exports (/Users/wittwerch/tmp/nextjs-gcp-storage/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/wittwerch/tmp/nextjs-gcp-storage/node_modules/webpack/lib/NormalModule.js:417:16)
    at /Users/wittwerch/tmp/nextjs-gcp-storage/node_modules/webpack/lib/NormalModule.js:452:10
    at /Users/wittwerch/tmp/nextjs-gcp-storage/node_modules/webpack/lib/NormalModule.js:323:13
    at /Users/wittwerch/tmp/nextjs-gcp-storage/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/wittwerch/tmp/nextjs-gcp-storage/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/wittwerch/tmp/nextjs-gcp-storage/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /Users/wittwerch/tmp/nextjs-gcp-storage/node_modules/next/dist/compiled/babel-loader/index.js:1:6042 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

You have to use this option, otherwise the build fails:

export NODE_OPTIONS=--openssl-legacy-provider

wittwerch avatar Feb 04 '22 05:02 wittwerch

It's running OK in Node 18 LTS. Make sure to use the updated version of package.json.

ImBIOS avatar Dec 07 '22 14:12 ImBIOS