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

xxhash64 Not supported on Node v16 and openssl 1.1.1f #6806

Closed
faraz5040 opened this issue Nov 3, 2021 · 8 comments
Closed

xxhash64 Not supported on Node v16 and openssl 1.1.1f #6806

faraz5040 opened this issue Nov 3, 2021 · 8 comments
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@faraz5040
Copy link

faraz5040 commented Nov 3, 2021

Version

5.0.0-beta.7

Environment info

Environment Info:

  System:
    OS: Linux 5.11 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
  Binaries:
    Node: 16.13.0 - ~/.local/n/bin/node
    Yarn: 1.22.15 - ~/.local/n/bin/yarn
    npm: 8.1.0 - ~/.local/n/bin/npm
   openssl: 1.1.1f
  Browsers:
    Chrome: 95.0.4638.69
    Firefox: 93.0
  npmPackages:
    @chenfengyuan/vue-countdown: ^1.1.5 => 1.1.5 
    @ec-nordbund/vuetify-icon-injector: ^2.3.4 => 2.3.4 
    @fullhuman/vue-cli-plugin-purgecss: ^4.0.3 => 4.0.3 
    @sentry/vue: ^6.13.3 => 6.13.3 
    @vue/babel-helper-vue-jsx-merge-props:  1.2.1 
    @vue/babel-helper-vue-transform-on:  1.0.2 
    @vue/babel-plugin-jsx:  1.1.1 
    @vue/babel-plugin-transform-vue-jsx:  1.2.1 
    @vue/babel-preset-app:  5.0.0-beta.7 
    @vue/babel-preset-jsx:  1.2.4 
    @vue/babel-sugar-composition-api-inject-h:  1.2.1 
    @vue/babel-sugar-composition-api-render-instance:  1.2.4 
    @vue/babel-sugar-functional-vue:  1.2.2 
    @vue/babel-sugar-inject-h:  1.2.2 
    @vue/babel-sugar-v-model:  1.2.3 
    @vue/babel-sugar-v-on:  1.2.3 
    @vue/cli-overlay:  5.0.0-beta.7 
    @vue/cli-plugin-babel: =5.0.0-beta.7 => 5.0.0-beta.7 
    @vue/cli-plugin-eslint: =5.0.0-beta.7 => 5.0.0-beta.7 
    @vue/cli-plugin-pwa: =5.0.0-beta.7 => 5.0.0-beta.7 
    @vue/cli-plugin-router:  5.0.0-beta.7 
    @vue/cli-plugin-typescript: =5.0.0-beta.7 => 5.0.0-beta.7 
    @vue/cli-plugin-vuex:  5.0.0-beta.7 
    @vue/cli-service: =5.0.0-beta.7 => 5.0.0-beta.7 
    @vue/cli-shared-utils:  5.0.0-beta.7 (4.5.15)
    @vue/component-compiler-utils:  3.3.0 
    @vue/composition-api: * => 1.3.0 
    @vue/eslint-config-prettier: ^6.0.0 => 6.0.0 
    @vue/eslint-config-typescript: ^9.0.0 => 9.0.0 
    @vue/web-component-wrapper:  1.3.0 
    eslint-plugin-vue: ^8.0.3 => 8.0.3 
    svg-to-vue:  0.7.0 
    typescript: ^4.4.4 => 4.4.4 
    vue: ^2.6.14 => 2.6.14 
    vue-class-component: ^7.2.6 => 7.2.6 
    vue-cli-plugin-capacitor: ^2.0.1 => 2.0.1 
    vue-cli-plugin-i18n: ^2.3.1 => 2.3.1 
    vue-eslint-parser:  8.0.1 
    vue-flickity: ^1.2.1 => 1.2.1 
    vue-hot-reload-api:  2.3.4 
    vue-i18n: ^8.26.5 => 8.26.5 
    vue-i18n-extract:  1.0.2 
    vue-infinite-loading: ^2.4.5 => 2.4.5 
    vue-loader:  16.8.2 (15.9.8)
    vue-meta: ^2.4.0 => 2.4.0 
    vue-property-decorator: ^9.1.2 => 9.1.2 
    vue-router: ^3.5.3 => 3.5.3 
    vue-style-loader:  4.1.3 
    vue-svg-loader: ^0.16.0 => 0.16.0 
    vue-template-compiler: ^2.6.14 => 2.6.14 
    vue-template-es2015-compiler:  1.9.1 
    vuetify: ^2.5.10 => 2.5.10 
    vuetify-loader: ^1.7.3 => 1.7.3 
    vuex: ^3.6.2 => 3.6.2 
  npmGlobalPackages:
    @vue/cli: 5.0.0-beta.7

Steps to reproduce

Run latest vue-cli v5.0.0-beta.7 or run command:

node -e "require('crypto').createHash('xxhash64', { encoding: 'hex' })"

What is expected?

Create xxhash64 and serve without error

What is actually happening?

NodeJS error
Error: Digest method not supported

@sodatea
Copy link
Member

sodatea commented Nov 3, 2021

Could you provide a reproduction repo? Because it works well in our tests, which runs on Node.js v16

@sodatea sodatea added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Nov 3, 2021
@faraz5040 faraz5040 changed the title xxhash64 Not supported on Node v16 amd openssl 1.1.1f xxhash64 Not supported on Node v16 and openssl 1.1.1f Nov 3, 2021
@faraz5040
Copy link
Author

The issue is gone for some reason now.
But out of curiosity, shouldn't running

node -e "require('crypto').createHash('xxhash64')"

just work?

@alimony
Copy link

alimony commented Nov 4, 2021

I'm seeing this issue too after upgrading to beta 7:

$ node -e "require('crypto').createHash('xxhash64')"

node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^
Error: Digest method not supported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at [eval]:1:19
    at Script.runInThisContext (node:vm:129:12)
    at Object.runInThisContext (node:vm:305:38)
    at node:internal/process/execution:81:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:80:60)
    at node:internal/main/eval_string:27:3

Node.js v17.0.1

@alimony
Copy link

alimony commented Nov 4, 2021

Getting an error on node 16 too:

$ node --version
v16.13.0

$ yarn serve
 INFO  Starting development server...
[10%] building (0/1 modules)
Error: Digest method not supported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at BulkUpdateDecorator.hashFactory (/Users/markus/Documents/getpublished.xyz/node_modules/webpack/lib/util/createHash.js:145:18)
    at BulkUpdateDecorator.update (/Users/markus/Documents/getpublished.xyz/node_modules/webpack/lib/util/createHash.js:46:50)
    at OriginalSource.updateHash (/Users/markus/Documents/getpublished.xyz/node_modules/webpack-sources/lib/OriginalSource.js:138:8)
    at NormalModule._initBuildHash (/Users/markus/Documents/getpublished.xyz/node_modules/webpack/lib/NormalModule.js:880:17)
    at handleParseResult (/Users/markus/Documents/getpublished.xyz/node_modules/webpack/lib/NormalModule.js:946:10)
    at /Users/markus/Documents/getpublished.xyz/node_modules/webpack/lib/NormalModule.js:1040:4
    at processResult (/Users/markus/Documents/getpublished.xyz/node_modules/webpack/lib/NormalModule.js:755:11)
    at /Users/markus/Documents/getpublished.xyz/node_modules/webpack/lib/NormalModule.js:819:5
node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);

@sodatea
Copy link
Member

sodatea commented Nov 5, 2021

But out of curiosity, shouldn't running

node -e "require('crypto').createHash('xxhash64')"

just work?

xxhash64 is not a built-in hash function. Webpack implements it on its own.
https://github.com/webpack/webpack/blob/c60fc2fae533461bc654742b6024bea3071d8870/lib/util/createHash.js#L145-L152

@sodatea
Copy link
Member

sodatea commented Nov 5, 2021

If anyone still encounters this error, please open a new issue with a minimal reproduction.

@sodatea sodatea closed this as completed Nov 5, 2021
@alimony
Copy link

alimony commented Nov 8, 2021

@sodatea The custom webpack implementation was added in 5.54.0 but my setup has installed 5.50.0 and stays there. How would I force the webpack version? Shouldn't resolving dependencies catch this?

@say8425
Copy link

say8425 commented Nov 10, 2021

I have same issue on the nodejs 16
But I can not use nodejs 17 so I rollback to beta6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests

4 participants