Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn build fails with "error:0308010C:digital envelope routines::unsupported" #275

Open
Xiretza opened this issue May 8, 2024 · 7 comments

Comments

@Xiretza
Copy link
Contributor

Xiretza commented May 8, 2024

$ yarn
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @material-ui/[email protected]" has unmet peer dependency "@date-io/core@^1.3.6".
warning " > @material-ui/[email protected]" has unmet peer dependency "prop-types@^15.6.0".
warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=5".
[4/4] Building fresh packages...
Done in 1.91s.
$ yarn build
yarn run v1.22.22
$ react-scripts build
Creating an optimized production build...
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:80:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (/home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/xiretza/dev/etebase/etesync-web/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/xiretza/dev/etebase/etesync-web/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/xiretza/dev/etebase/etesync-web/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/home/xiretza/dev/etebase/etesync-web/node_modules/react-scripts/scripts/build.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:80:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (/home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/NormalModule.js:417:16)
    at /home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/NormalModule.js:452:10
    at /home/xiretza/dev/etebase/etesync-web/node_modules/webpack/lib/NormalModule.js:323:13
    at /home/xiretza/dev/etebase/etesync-web/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /home/xiretza/dev/etebase/etesync-web/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/home/xiretza/dev/etebase/etesync-web/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/xiretza/dev/etebase/etesync-web/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
  opensslErrorStack: [
    'error:03000086:digital envelope routines::initialization error',
    'error:0308010C:digital envelope routines::unsupported'
  ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v21.7.3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@wbevans
Copy link

wbevans commented Jul 1, 2024

You can get it to build by setting this environment variable:

export NODE_OPTIONS=--openssl-legacy-provider

@tasn
Copy link
Member

tasn commented Jul 1, 2024

I think they fixed it in more recent node versions (at least in Arch, I no longer need this workaround), but yeah exactly what @wbevans said!

@tasn
Copy link
Member

tasn commented Jul 1, 2024

(closing this ticket, as it's an issue with node, and not etesync specific)

@tasn tasn closed this as completed Jul 1, 2024
@wbevans
Copy link

wbevans commented Jul 1, 2024

Still get this error without setting the env variable on latest Arch. Node version 22.3.0

@tasn
Copy link
Member

tasn commented Jul 1, 2024

Oh sorry, it's the uring one that I stopped getting, I'm still getting this one. You're right.

@tasn tasn reopened this Jul 1, 2024
@meaz
Copy link

meaz commented Jul 10, 2024

I get that error even when I set the env variable on Debian Bookworm, node v20.5.1

@meaz
Copy link

meaz commented Jul 10, 2024

Nevermind, it works... Sorry for noise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants