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
Fails with Node.js 17 #805
Comments
Fixed in #809 |
For some reasons, #809 and 0.32.0 does not resolve the issue.
|
The issue may have something to do with ncc's failure to bundle the WebAssembly modules. I encounter some issues with the WebAssembly modules in the past. However, in this case, the issue could prevent webpack from using its own hash implementation: https://github.com/webpack/webpack/tree/main/assembly/hash This could become a bigger problem in next version of webpack, since xxhash64 would become default, and there is no OpenSSL implementation to fallback to. |
Can you share steps to reproduce the issue? Then @sokra can take a look too. |
It is very simple. Install Node v17, and run ncc on any project. |
I see. There’s a PR to add Node 16 support #801 I haven’t tried Node 17 yet but it looks like the hash algo used is not supported by crypto.createHash() Probably md4 was dropped so we can try sha1 instead. |
Any news with this? I can confirm the problem is with Node 17. |
I was able to get it to work with Node 17 with a hacky workaround, I added the following to my scripts in
|
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` `yarn dev` failed (exit 1) on Node.js 17 & Node.js 18: ``` ncc_amp_optimizer failed because error:0308010C:digital envelope routines::unsupported [...] ncc_next__react_dev_overlay failed because error:0308010C:digital envelope routines::unsupported ``` The issue was reported to `@vercel/ncc` (vercel/ncc#805) and fixed by vercel/ncc#868, and `@vercel/ncc@0.33.2` includes the fix. However, Next.js still uses `@vercel/ncc@0.33.1` in `devDependencies`. The PR bump `@vercel/ncc` to the latest version (which is 0.33.4).
Fixes "Error: error:0308010C:digital envelope routines::unsupported" as Debian's nodejs v16.15.0 is already compiled with OpenSSL 3. See vercel/ncc#805 The full error log is as follows: > ncc build ./src/index.ts -o lib --minify ncc: Version 0.27.0 ncc: Compiling file index.js Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at hashOf (/home/foka/OpenDRR/actions-gh-pages/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:3253134) at ncc (/home/foka/OpenDRR/actions-gh-pages/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:3256648) at runCmd (/home/foka/OpenDRR/actions-gh-pages/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:51537) at Object.819 (/home/foka/OpenDRR/actions-gh-pages/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:48344) at __webpack_require__ (/home/foka/OpenDRR/actions-gh-pages/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:55043) at /home/foka/OpenDRR/actions-gh-pages/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:55194 at /home/foka/OpenDRR/actions-gh-pages/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:55220 at Object.<anonymous> (/home/foka/OpenDRR/actions-gh-pages/node_modules/@vercel/ncc/dist/ncc/cli.js:8:28) { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` `yarn dev` failed (exit 1) on Node.js 17 & Node.js 18: ``` ncc_amp_optimizer failed because error:0308010C:digital envelope routines::unsupported [...] ncc_next__react_dev_overlay failed because error:0308010C:digital envelope routines::unsupported ``` The issue was reported to `@vercel/ncc` (vercel/ncc#805) and fixed by vercel/ncc#868, and `@vercel/ncc@0.33.2` includes the fix. However, Next.js still uses `@vercel/ncc@0.33.1` in `devDependencies`. The PR bump `@vercel/ncc` to the latest version (which is 0.33.4).
This commit updates the documentation and updates @vercel/ncc to prevent a opensll error (see vercel/ncc#805).
* deprecatedになってたのでnode versionを上げる * node version upでエラーが発生したライブラリをversion up ref: vercel/ncc#805 * feat: build all actions * GHAの結果が帰ってこないので再PUSH --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Bug: webpack/webpack#14532
The text was updated successfully, but these errors were encountered: