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

Tutorial does not work due to outdated npm depenencies #115

Open
bluenote10 opened this issue Mar 19, 2023 · 4 comments
Open

Tutorial does not work due to outdated npm depenencies #115

bluenote10 opened this issue Mar 19, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@bluenote10
Copy link

Describe the Bug

The tutorial breaks in the npm run start step:

$ npm start

> [email protected] start
> webpack-dev-server

(node:20541) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www
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/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
    at /home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/www/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9
    at /home/fabian/git/RustExperiments/GuiExperiments/wasm-tutorial/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.15.0

Steps to Reproduce

Follow the tutorial steps up to the serving locally, when the dev server is started for the first time.

If applicable, add a link to a test case (as a zip file or link to a repository we can clone).

Expected Behavior

The step should succeed.

Actual Behavior

See error above.

Additional Context

The reason is most likely that the dependencies in the package.json are of the web app template are extremely outdated. Trying to update them with npx npm-check -u suggest major version jumps for all dependencies:

image

But trying to update them fails with an internal dependency conflict that I have yet to understand...

@bluenote10 bluenote10 added the bug Something isn't working label Mar 19, 2023
@Unic-X
Copy link

Unic-X commented Oct 30, 2023

I think there's a way to make it work, you can export this as an environment variable NODE_OPTIONS=--openssl-legacy-provider and then run npm run start or npm start it seemed to have worked for me.

@MariusDrulea
Copy link

MariusDrulea commented Jan 18, 2024

@Unic-X how did you manage to find the solution? It worked for me as well.
image

@Unic-X
Copy link

Unic-X commented Apr 26, 2024

@MariusDrulea, I also looked up somewhere i don't remember correctly, but i think this _Hash functions is the problem, and after looking for a bit i found out using --legacy version for openssl might fix it

@graydenshand
Copy link

This bug is in create-wasm-app rather than this tutorial.

See related issue on that repo: rustwasm/create-wasm-app#214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants