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
[JS] "gulp bundle:webpack" fails with Node.js 18 #36025
Comments
@abetomo Can you fix this? |
I will check it and fix it. |
take |
I ran the same command as reported and got the following error.
So I ran
@kou Different node version?
|
I used system NodeJS Could you try this on Debian GNU/Linux bookwarm? It seems that it uses the same versions. |
Thanks for the info.
I will try to fix it. |
It seems to succeed in Node.js 18.14.0 or later. |
Thanks. |
It's a Node.js bug. |
I see. diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh
index 4183520a0..8aeb0f6b5 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -315,22 +315,22 @@ install_nodejs() {
return 0
fi
- required_node_major_version=16
node_major_version=$(node --version 2>&1 | grep -o '^v[0-9]*' | sed -e 's/^v//g' || :)
-
- if [ -n "${node_major_version}" ] && [ "${node_major_version}" -ge ${required_node_major_version} ]; then
- show_info "Found NodeJS installation with major version ${node_major_version}"
+ node_minor_version=$(node --version 2>&1 | grep -o '^v[0-9]*\.[0-9]*' | sed -e 's/^v[0-9]*\.//g' || :)
+ if [ -n "${node_major_version}" ] && [ -n "${node_minor_version}" ] && \
+ { [ "${node_major_version}" -eq 16 ] || \
+ { [ "${node_major_version}" -eq 18 ] && [ "${node_minor_version}" -ge 14 ] } || \
+ [ "${node_major_version}" -ge 20 ] }; then
+ show_info "Found Node.js installation with major version ${node_major_version}.${node_minor_version}"
else
- export NVM_DIR="`pwd`/.nvm"
+ export NVM_DIR="$(pwd)/.nvm"
mkdir -p $NVM_DIR
curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | \
PROFILE=/dev/null bash
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
- # ARROW-18335: "gulp bundle" failed with Node.js 18.
- # nvm install --lts
- nvm install 16
- show_info "Installed NodeJS $(node --version)"
+ nvm install --lts
+ show_info "Installed Node.js $(node --version)"
fi
NODEJS_ALREADY_INSTALLED=1
@@ -837,7 +837,7 @@ test_js() {
show_header "Build and test JavaScript libraries"
maybe_setup_nodejs || exit 1
- maybe_setup_conda nodejs=16 || exit 1
+ maybe_setup_conda nodejs=18 || exit 1
if ! command -v yarn &> /dev/null; then
npm install yarn We can test |
Thanks for making these updates to the CI! |
I will update |
…candidate.sh` Signed-off-by: abetomo <abe@enzou.tokyo>
…ate.sh` (#36089) ### Rationale for this change In Node.js 18.14 or later, `gulp bundle:webpack` succeeds. So we support running `verify-release-candidate.sh` with Node.js 18.14 or later. ### What changes are included in this PR? Node.js version check allows 16, 18.14 or later. Install Node.js LTS with `nvm`. ### Are these changes tested? I have tested that `TEST_DEFAULT=0 TEST_JS=1 dev/release/verify-release-candidate.sh` succeeds in several environments. * Node.js is not installed * v18.16.0 installed with `nvm` and `verify-release-candidate.sh` succeeded. * Node.js 16.x installed * Node.js 16.x is used and `verify-release-candidate.sh` succeeded. * Node.js 18.13.0 installed * v18.16.0 installed with `nvm` and `verify-release-candidate.sh` succeeded. * Node.js 18.14.0 installed * Node.js 18.14.0 is used and `verify-release-candidate.sh` succeeded. * Node.js 20.x installed * Node.js 20.x is used and `verify-release-candidate.sh` succeeded. ### Are there any user-facing changes? * Closes: #36025 Authored-by: abetomo <abe@enzou.tokyo> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Describe the enhancement requested
#33504 reported the same problem but closed with a workaround (using Node.js 16 instead of 18).
Component(s)
JavaScript
The text was updated successfully, but these errors were encountered: