Skip to content

Pin Node.js and Yarn versions - #46

Merged
etagwerker merged 3 commits into
mainfrom
pin-node-and-yarn
Nov 21, 2026
Merged

etagwerker merged 3 commits into
mainfrom
pin-node-and-yarn

Conversation

@etagwerker

@etagwerker etagwerker commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Context

Heroku's build output warns that the default versions of Node.js and Yarn are
not pinned and can change over time:

Default version of Node.js changed (24.13.0 to 26.13.1)
Installing a default version (1.22.22) of Yarn. This version is not pinned
and can change over time, causing unexpected failures.

Node is only used at build time (esbuild and tailwindcss), but our build
tools are fairly old, so a silent jump across Node majors could break deploys.

Changes

  • Pin Node.js to 26.x and Yarn to 1.22.x via engines in package.json
  • Add nodejs 26.13.1 to .tool-versions so local dev matches
  • Add an actions/setup-node@v4 step to the CI workflow that reads
    package.json, so CI installs the pinned Node version

Notes

  • The heroku/nodejs buildpack is already in front of heroku/ruby on the app,
    so it reads engines to pick the versions.
  • 26.13.1 is the version Heroku installed by default on the last deploy, and
    the asset build (esbuild and tailwindcss) succeeded with it.
  • The CI workflow needed the new step because it never installed Node. It used
    the runner's preinstalled 24.x, which yarn install rejects against
    engines.node: 26.x.

Testing

  • CI is green
  • Deploy and confirm the Node/Yarn warnings are gone and the build installs
    Node 26.x

🤖 Generated with Claude Code

etagwerker and others added 3 commits November 20, 2026 22:52
Heroku warns that unpinned default versions of Node.js and Yarn can
change over time. Pin them via package.json engines and .tool-versions.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Heroku's default (26.13.1) built the app successfully, so pin to it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The runner's preinstalled Node (24.22.3) does not satisfy engines.node 26.x,
so yarn install failed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@etagwerker
etagwerker temporarily deployed to librarian-production November 21, 2026 04:03 Inactive
@etagwerker
etagwerker merged commit f5ef301 into main Nov 21, 2026
1 check passed

This branch was previously deployed

1 inactive deployment
librarian-production — 68106a66 Deployed Nov 21, 2026 by etagwerker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant