Reputation: 71
I try to install vendure e-commerce and when I run yarn dev in vsf-vendure directory who operates the front page for the store I got error
Error: error:0308010C:digital envelope routines::unsupported
So I using
export NODE_OPTIONS=--openssl-legacy-provider
And then every thing is okay but after restarting the command I got the error again and the previous command not working again and there's react-start in package.json just nuxt start and I was try it and not working too
And this the error logs
sudo yarn dev 130 ⨯
yarn run v1.22.18
$ nuxt
ℹ VSF Starting Vue Storefront Nuxt Module 22:57:35
✔ VSF Installed Vue Storefront Context plugin 22:57:35
✔ VSF Installed Vue Storefront SSR plugin 22:57:35
✔ VSF Installed VSF Logger plugin 22:57:35
✔ VSF Installed Vue Storefront E2E testing plugin 22:57:35
✔ VSF Installed Internationalization Cookies plugin 22:57:35
WARN useMeta is not supported in onGlobalSetup as @nuxtjs/pwa detected. 22:57:35
See https://github.com/nuxt-community/composition-api/issues/307
✔ VSF Installed nuxt Composition API Module 22:57:35
✔ VSF Installed StorefrontUI Module 22:57:35
✔ VSF Installed Performance Module 22:57:35
ℹ VSF Using raw source/ESM for @vue-storefront/vendure 22:57:35
ℹ VSF Using raw source/ESM for @vue-storefront/core 22:57:35
ℹ VSF Using raw source/ESM for @storefront-ui/vue 22:57:35
ℹ VSF Using raw source/ESM for @storefront-ui/shared 22:57:35
ℹ VSF Starting Theme Module 22:57:35
ℹ Middleware starting.... 22:57:35
ℹ Loading integrations... 22:57:35
ℹ - Loading: vendure @vue-storefront/vendure-api/server 22:57:35
ℹ - Loading: vendure extension: tokenExtension 22:57:35
ℹ - Loading: vendure extension: localiseExtension 22:57:35
✔ - Integration: vendure loaded! 22:57:35
✔ Integrations loaded! 22:57:35
✔ Middleware created! 22:57:35
ERROR (node:6514) [DEP0128] DeprecationWarning: Invalid 'main' field in '/var/www/html/ecommerce/commecrce/my-app/vsf-vendure/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 22:57:35
ℹ Initial build may take a while 22:57:35
✔ Builder initialized 22:57:35
✔ Nuxt files generated 22:57:35
● Client █████████████████████████ compiling (0%)
◯ Server
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 (/var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/webpack/lib/NormalModule.js:471:10)
at /var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/webpack/lib/NormalModule.js:503:5
at /var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/webpack/lib/NormalModule.js:358:12
at /var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at Array.<anonymous> (/var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /var/www/html/ecommerce/commecrce/my-app/vsf-vendure/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
at /var/www/html/ecommerce/commecrce/my-app/vsf-vendure/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'
}
Upvotes: 1
Views: 1073
Reputation: 324
I just had the exact same issue with react and did the following
"start": "react-scripts --openssl-legacy-provider start",
It's not very clear if you are using Vue or React so let me know and I'll remove my answer :)
Upvotes: 1
Reputation: 166
The export NODE_OPTIONS=--openssl-legacy-provider
needs to be added every time you run the scripts.
Or you can add it to your own environment variable, so Node will use it in any instance it starts.
Upvotes: 0