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

Undici cannot be required in --without-intl Node.js #3002

Closed
panva opened this issue Mar 27, 2024 · 5 comments
Closed

Undici cannot be required in --without-intl Node.js #3002

panva opened this issue Mar 27, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@panva
Copy link
Member

panva commented Mar 27, 2024

Bug Description

Undici cannot be required in --without-intl Node.js

Reproducible By

# in nodejs/node
./configure --node-builtin-modules-path $(pwd) --without-intl --ninja
make

# in a project with undici
cat package.json | jq '.dependencies.undici'
"^6.10.1"
../node/node -e "require('undici')"

node:internal/encoding:487
          throw new ERR_NO_ICU('"fatal" option');
          ^

TypeError [ERR_NO_ICU]: "fatal" option is not supported on Node.js compiled without ICU
    at new TextDecoder (node:internal/encoding:487:17)
    at Object.<anonymous> (/repo/node_modules/undici/lib/web/websocket/util.js:71:21)
    at Module._compile (node:internal/modules/cjs/loader:1421:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1499:10)
    at Module.load (node:internal/modules/cjs/loader:1232:32)
    at Module._load (node:internal/modules/cjs/loader:1048:12)
    at Module.require (node:internal/modules/cjs/loader:1257:19)
    at require (node:internal/modules/helpers:188:18)
    at Object.<anonymous> (/repo/node_modules/undici/lib/web/websocket/websocket.js:24:5)
    at Module._compile (node:internal/modules/cjs/loader:1421:14) {
  code: 'ERR_NO_ICU'
}

Expected Behavior

Undici CI also tests on Node.js without ICU so that releases that cannot be merged to Node.js don't happen

See

@panva panva added the bug Something isn't working label Mar 27, 2024
@KhafraDev
Copy link
Member

this is a recurring issue, we should run tests on builds without icu

cc @mweberxyz @Uzlopak

@mweberxyz
Copy link
Contributor

mweberxyz commented Mar 28, 2024

👀

@KhafraDev Do you happen to know of anyone building binaries --without-intl? I can work on a workflow that builds (and caches) a non-icu build just for undici's use, but better to not have to reinvent the wheel if it is already being done.

@KhafraDev
Copy link
Member

I don't sorry, I thought it'd be similar to the nightly workflow 😅

@mweberxyz
Copy link
Contributor

mweberxyz commented Mar 28, 2024

I also asked around in the #nodejs-build channel in OpenJS foundation slack. My intuition is no, I am going to have to build Node in this repo's actions.

I think we can do it in the PR workflow (as opposed to the nightly) to make sure we catch regressions before they even merge to main.

@mweberxyz
Copy link
Contributor

Can this issue be closed?

#2999 fixes the particular regression and #3015 attempts to prevent future regressions.

The only remaining open questions surround the tests excluded from CI and broken websocket functionality when Node is built --without-intl.

@mcollina mcollina closed this as completed Apr 2, 2024
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