blitz-js / legacy-framework

MIT License
3 stars 2 forks source link

Error: error:0308010C:digital envelope routines::unsupported #45

Closed nerkn closed 2 years ago

nerkn commented 2 years ago

What is the problem?

After install and run dev

Paste all your error logs here:


eady - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:133896:18)
    at BulkUpdateDecorator.update (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:133797:50)
    at OriginalSource.updateHash (/app/blitz/node_modules/next/dist/compiled/webpack-sources3/index.js:1:10264)
    at NormalModule._initBuildHash (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63424:17)
    at handleParseResult (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63490:10)
    at /app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63584:4
    at processResult (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63299:11)
    at /app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63363:5
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:133896:18)
    at BulkUpdateDecorator.update (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:133797:50)
    at OriginalSource.updateHash (/app/blitz/node_modules/next/dist/compiled/webpack-sources3/index.js:1:10264)
    at NormalModule._initBuildHash (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63424:17)
    at handleParseResult (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63490:10)
    at /app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63584:4
    at processResult (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63299:11)
    at /app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63363:5
node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:133896:18)
    at BulkUpdateDecorator.update (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:133797:50)
    at OriginalSource.updateHash (/app/blitz/node_modules/next/dist/compiled/webpack-sources3/index.js:1:10264)
    at NormalModule._initBuildHash (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63424:17)
    at handleParseResult (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63490:10)
    at /app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63584:4
    at processResult (/app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63299:11)
    at /app/blitz/node_modules/next/dist/compiled/webpack/bundle5.js:63363:5 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.3.0

Paste all relevant code snippets here:

no

What are detailed steps to reproduce this?

  1. yarn global add blitz
  2. blitz new blitz
  3. cd blitz
  4. blitz dev

Run blitz -v and paste the output here:

blitz -v
Loaded env from /app/blitz/.env.local
Loaded env from /app/blitz/.env
Linux 5.4 | linux-x64 | Node: v18.3.0

blitz: 0.45.4 (global)
blitz: 0.45.4 (local)

  Package manager: yarn 
  System:
    OS: Linux 5.4 Alpine Linux
    CPU: (4) x64 Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz
    Memory: 14.39 GB / 19.34 GB
    Shell: 1.35.0 - /bin/ash
  Binaries:
    Node: 18.3.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/client: 3.15.1 => 3.15.1 
    blitz: 0.45.4 => 0.45.4 
    prisma: 3.15.1 => 3.15.1 
    react: 18.0.0 => 18.0.0 
    react-dom: 18.0.0 => 18.0.0 
    typescript: Not Found

Please include below any other applicable logs and screenshots that show your problem:

No response

nerkn commented 2 years ago

export NODE_OPTIONS=--openssl-legacy-provider worked

beerose commented 2 years ago

The issue here may be your Nodejs version — Blitz works with the stable version and it doesn't work with 17 and newer version (afaik Next.js 11 also doesn't).

beerose commented 2 years ago

I'm going to close this issue as it's not directly related to Blitz.