Repository navigation
Error: error:0308010C:digital envelope routines::unsupported #574
Copy link
Copy link
Closed
Labels
a:bugSomething isn't workingSomething isn't working
Description
Can the issue be reproduced with the latest available release? (y/n)
Which one is the environment gotify server is running in?
- Docker
- Linux machine
- Windows machine
Docker startup command or config file here (please mask sensitive information)
$ yarn ; yarn install ; yarn build
...
yarn run v1.22.19
$ react-scripts build
Creating an optimized production build...
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:138:10)
at module.exports (/home/yonas/git/server/ui/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/home/yonas/git/server/ui/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/home/yonas/git/server/ui/node_modules/webpack/lib/NormalModule.js:471:10)
at /home/yonas/git/server/ui/node_modules/webpack/lib/NormalModule.js:503:5
at /home/yonas/git/server/ui/node_modules/webpack/lib/NormalModule.js:358:12
at /home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at runSyncOrAsync (/home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
at iterateNormalLoaders (/home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array.<anonymous> (/home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/home/yonas/git/server/ui/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /home/yonas/git/server/ui/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
/home/yonas/git/server/ui/node_modules/react-scripts/scripts/build.js:19
throw err;
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:138:10)
at module.exports (/home/yonas/git/server/ui/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/home/yonas/git/server/ui/node_modules/webpack/lib/NormalModule.js:417:16)
at /home/yonas/git/server/ui/node_modules/webpack/lib/NormalModule.js:452:10
at /home/yonas/git/server/ui/node_modules/webpack/lib/NormalModule.js:323:13
at /home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/yonas/git/server/ui/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /home/yonas/git/server/ui/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v20.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Ubuntu 23.04
gotify: 5cd2d54
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a:bugSomething isn't workingSomething isn't working
Activity
jmattheis commentedon Jun 30, 2023
The UI still uses an older react-scripts version which uses the legacy openssl provider. if you're Nodejs > 16, then you've to add this env variable, and then execute
yarn build.yonas commentedon Jun 30, 2023
EDIT
@jmattheis Thanks, that worked!
yonas commentedon Jun 30, 2023
I recommend that the build script detects the running node version and sets this environment variable on behalf of the user.
jmattheis commentedon Jul 2, 2023
Maybe, but it's probably better to remove the need for the legacy openssl version by updating the react-scripts dependency.
yonas commentedon Jul 2, 2023
@jmattheis When updating
react-scriptsto^5.0.1, I get this error:jmattheis commentedon Jul 3, 2023
Yeah, only updating react-scripts isn't enough, everything that depends on it must be updated too.
shiraz27 commentedon Oct 11, 2023
You can simply use node v16, try NVM for switching between versions easily.
icetech233 commentedon Oct 8, 2024
yes