vuestorefront-community / vendure

Vue Storefront 2 integration for Vendure
https://docs.vuestorefront.io/vendure/
MIT License
72 stars 51 forks source link

error:0308010C:digital envelope routines::unsupported #208

Closed OlegKunitsyn closed 2 years ago

OlegKunitsyn commented 2 years ago
$ yarn dev
yarn run v1.22.10
$ nuxt
ℹ VSF Starting Vue Storefront Nuxt Module                                                                                                                      15:23:10
✔ VSF Installed Vue Storefront Context plugin                                                                                                                  15:23:10
✔ VSF Installed Vue Storefront SSR plugin                                                                                                                      15:23:10
✔ VSF Installed VSF Logger plugin                                                                                                                              15:23:10
✔ VSF Installed Vue Storefront E2E testing plugin                                                                                                              15:23:10
✔ VSF Installed Internationalization Cookies plugin                                                                                                            15:23:10

 WARN  useMeta is not supported in onGlobalSetup as @nuxtjs/pwa detected.                                                                                      15:23:10
See https://github.com/nuxt-community/composition-api/issues/307

✔ VSF Installed nuxt Composition API Module                                                                                                                    15:23:10
✔ VSF Installed StorefrontUI Module                                                                                                                            15:23:10
✔ VSF Installed Performance Module                                                                                                                             15:23:10
ℹ VSF Using raw source/ESM for @vue-storefront/vendure                                                                                                         15:23:10
ℹ VSF Using raw source/ESM for @vue-storefront/core                                                                                                            15:23:10
ℹ VSF Using raw source/ESM for @storefront-ui/vue                                                                                                              15:23:10
ℹ VSF Using raw source/ESM for @storefront-ui/shared                                                                                                           15:23:10
ℹ VSF Starting Theme Module                                                                                                                                    15:23:10
ℹ Middleware starting....                                                                                                                                      15:23:10
ℹ Loading integrations...                                                                                                                                      15:23:10
ℹ - Loading: vendure @vue-storefront/vendure-api/server                                                                                                        15:23:10
ℹ - Loading: vendure extension: tokenExtension                                                                                                                 15:23:10
ℹ - Loading: vendure extension: localiseExtension                                                                                                              15:23:10
✔ - Integration: vendure loaded!                                                                                                                               15:23:10
✔ Integrations loaded!                                                                                                                                         15:23:10
✔ Middleware created!                                                                                                                                          15:23:10

 ERROR  (node:64093) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/alex/projects/vendure/frontend/node_modules/@vue-storefront/nuxt-theme/package.json' of 'lib/module.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)

   ╭───────────────────────────────────────╮
   │                                       │
   │   Nuxt @ v2.15.8                      │
   │                                       │
   │   ▸ Environment: development          │
   │   ▸ Rendering:   server-side          │
   │   ▸ Target:      server               │
   │                                       │
   │   Listening: http://localhost:3001/   │
   │                                       │
   ╰───────────────────────────────────────╯

ℹ Preparing project for development                                                                                                                            15:23:11
ℹ Initial build may take a while                                                                                                                               15:23:11
✔ Builder initialized                                                                                                                                          15:23:11
✔ Nuxt files generated                                                                                                                                         15:23:11

● Client █████████████████████████ building (10%) 1/2 modules 1 active
 node_modules/webpack-hot-middleware/client.js

● Server █████████████████████████ building (10%) 1/1 modules 0 active

 ERROR  Error: error:0308010C:digital envelope routines::unsupported                                                                                           15:23:12
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at module.exports (/home/alex/projects/vendure/frontend/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/alex/projects/vendure/frontend/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/alex/projects/vendure/frontend/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/alex/projects/vendure/frontend/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/alex/projects/vendure/frontend/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at runSyncOrAsync (/home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/alex/projects/vendure/frontend/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/alex/projects/vendure/frontend/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9

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:135:10)
    at module.exports (/home/alex/projects/vendure/frontend/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/alex/projects/vendure/frontend/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/alex/projects/vendure/frontend/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/alex/projects/vendure/frontend/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/alex/projects/vendure/frontend/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/alex/projects/vendure/frontend/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/alex/projects/vendure/frontend/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/alex/projects/vendure/frontend/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /home/alex/projects/vendure/frontend/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v17.4.0
error Command failed with exit code 1.
Baroshem commented 2 years ago

@OlegKunitsyn

I would need more information than just the error log.

At first glance, it looks bit like an issue with SSL / HTTPS but would need more info to validate that

OlegKunitsyn commented 2 years ago

Works with Node.js v.14.

michaelbromley commented 2 years ago

Odd-numbered Node.js version (e.g. v17 in the original issue) often introduce breaks. For this reason, Vendure and other projects only officially support even-numbered (LTS) versions.

Anyway, searching the error brings up a bunch of results and threads discussing it, e.g.

The gist of it seems to be either downgrade to v16 or run with the --openssl-legacy-provider flag.

Baroshem commented 2 years ago

Closing as this seems to not be related to VSF project