FriendsOfShopware / FroshLazySizes

This plugin allows you to use lazy loading for your images.
MIT License
7 stars 2 forks source link

bin/build-storefront.sh results in an error #13

Closed qx54 closed 1 year ago

qx54 commented 1 year ago

PHP Version

8.1

Shopware Version

6.4.20.0

Actual behaviour

When I run bin/build-storefront.sh I get the following error:

● Shopware 6 Storefront █████████████████████████ building (10%) 0/2 modules 2 active
 babel-loader › ../../../../../../custom/plugins/FroshLazySizes/src/Resources/app/storefront/src/main.js

node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/ploi/www.domain.com/vendor/shopware/storefront/Resources/app/storefront/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/ploi/www.domain.com/vendor/shopware/storefront/Resources/app/storefront/node_modules/webpack/lib/NormalModule.js:412:16)
    at /home/ploi/www.domain.com/vendor/shopware/storefront/Resources/app/storefront/node_modules/webpack/lib/NormalModule.js:444:10
    at /home/ploi/www.domain.com/vendor/shopware/storefront/Resources/app/storefront/node_modules/webpack/lib/NormalModule.js:320:13
    at /home/ploi/www.domain.com/vendor/shopware/storefront/Resources/app/storefront/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /home/ploi/www.domain.com/vendor/shopware/storefront/Resources/app/storefront/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/home/ploi/www.domain.com/vendor/shopware/storefront/Resources/app/storefront/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/ploi/www.domain.com/vendor/shopware/storefront/Resources/app/storefront/node_modules/babel-loader/lib/index.js:55:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.14.0

Expected behaviour

No error.

Steps to Reproduce?

Run bin/build-storefront.sh with the extension FroshLazySizes installed.

tinect commented 1 year ago

Hey, thank you for you message.

This seems not directly related to this plugin.

Downgrade your node.js to v16 or check this messages: https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported

qx54 commented 1 year ago

Sorry for wrongfully raising the ticket and thank you for the help.

I used the export NODE_OPTIONS="--openssl-legacy-provider" workaround.