book
book copied to clipboard
error:03000086:digital envelope routines::initialization error
Describe the bug
Going through the tutorial on a fresh install of Ubuntu 22.04 LTS. When I got to the Serving Locally section, I ran npm run start
and got the following error:
> [email protected] start
> webpack-dev-server
ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /home/rick/_source/wasm/wasm-game-of-life/www
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:133:10)
at module.exports (/home/rick/_source/wasm/wasm-game-of-life/www/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/home/rick/_source/wasm/wasm-game-of-life/www/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/home/rick/_source/wasm/wasm-game-of-life/www/node_modules/webpack/lib/NormalModule.js:471:10)
at /home/rick/_source/wasm/wasm-game-of-life/www/node_modules/webpack/lib/NormalModule.js:503:5
at /home/rick/_source/wasm/wasm-game-of-life/www/node_modules/webpack/lib/NormalModule.js:358:12
at /home/rick/_source/wasm/wasm-game-of-life/www/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/home/rick/_source/wasm/wasm-game-of-life/www/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at Array.<anonymous> (/home/rick/_source/wasm/wasm-game-of-life/www/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/home/rick/_source/wasm/wasm-game-of-life/www/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
at /home/rick/_source/wasm/wasm-game-of-life/www/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9
at /home/rick/_source/wasm/wasm-game-of-life/www/node_modules/graceful-fs/graceful-fs.js:78: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 v18.2.0
To Reproduce Steps to reproduce the behavior:
- Start at the beginning of the tutorial. Note: I already had the latest Rust tools installed, but I didn't have
npm
orNode.js
. So, I followed the instructions to install those without any issues. - Proceed through the tutorial until you get to the Serving Locally section.
- Run the command
npm run start
. - See error mentioned above.
Expected behavior Expected it be served locally so I could browse to it.
Additional context I found this stackoverflow answer and was able to resolve my issue using this suggested workaround:
export NODE_OPTIONS=--openssl-legacy-provider
Just wanted to confirm that the solution @rickrain posted worked for me