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

error:03000086:digital envelope routines::initialization error #273

Open
rickrain opened this issue May 20, 2022 · 1 comment
Open

error:03000086:digital envelope routines::initialization error #273

rickrain opened this issue May 20, 2022 · 1 comment

Comments

@rickrain
Copy link

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:

> create-wasm-app@0.1.0 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:

  1. Start at the beginning of the tutorial. Note: I already had the latest Rust tools installed, but I didn't have npm or Node.js. So, I followed the instructions to install those without any issues.
  2. Proceed through the tutorial until you get to the Serving Locally section.
  3. Run the command npm run start.
  4. 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
@UnchartedSystems
Copy link

Just wanted to confirm that the solution @rickrain posted worked for me

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

2 participants