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

Warning for installations of Node.js v22.5.0 #1299

Merged
merged 3 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ install_nodejs() {
fi

echo "Downloading and installing node $number..."

if [[ "$number" == "22.5.0" ]]; then
warn_about_node_version_22_5_0
fi
fi

code=$(curl "$url" -L --silent --fail --retry 5 --retry-max-time 15 --retry-connrefused --connect-timeout 5 -o /tmp/node.tar.gz --write-out "%{http_code}")
Expand Down
12 changes: 12 additions & 0 deletions lib/failure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -995,3 +995,15 @@ warn_skipping_unsafe_pnpm_prune() {
must upgrade your version of pnpm to 8.15.6 or higher."
mcount 'warnings.pnpm.unsafe-prune'
}

warn_about_node_version_22_5_0() {
echo ""
warn "Issues with Node.js v22.5.0

Shortly after the release of Node.js v22.5.0, users began reporting issues around broken
or hanging installs for npm and Yarn. To avoid experiencing these problems with your builds
on Heroku, we recommend avoiding this release version until a fix has been released by
pinning to an earlier version of Node.js (e.g.; 22.4.1).
" "https://github.com/nodejs/node/pull/53934"
mcount 'warnings.node.22-5-0'
}
colincasey marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions test/fixtures/node-22.5.0-warning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A fake README, to keep npm from polluting stderr.
15 changes: 15 additions & 0 deletions test/fixtures/node-22.5.0-warning/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "node-buildpack-test-app",
"version": "0.0.1",
"description": "node buildpack integration test app",
"repository" : {
"type" : "git",
"url" : "http://github.com/example/example.git"
},
"engines": {
"node": "22.5.0"
},
"scripts": {
"start": "node foo.js"
}
}
7 changes: 7 additions & 0 deletions test/run
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,13 @@ testPnpmWorkspaceBinaries() {
assertCapturedSuccess
}

testWarningNode_22_5_0() {
compile "node-22.5.0-warning"
assertCaptured "Issues with Node.js v22.5.0"
cat "$STD_OUT"
assertCapturedSuccess
}

# Utils

pushd "$(dirname 0)" >/dev/null
Expand Down
Loading