Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#40523·mastodon

Mastodon 4.7.2 build fails during Yarn link step with Node.js 26

Author: zoltixCreated Sep 15, 2026Updated Sep 15, 2026
Labelsstatus/to triage

Steps to reproduce the problem

Steps to reproduce

  1. Upgrade an existing Mastodon installation to Mastodon 4.7.2 on Arch Linux.

  2. Build Mastodon using the Arch Linux PKGBUILD.

  3. The PKGBUILD runs:

corepack enable --install-directory . yarn ./yarn install --immutable

  1. Bundler completes successfully.

  2. Yarn downloads the dependencies, but fails during the Link step.

The system was using:

Node.js 26.8.2 Yarn 4.18.0 Corepack 0.36.0

The build finally aborts with:

Error: The onCancel handler was attached after the promise settled.

Node.js v26.8.2 ==> ERROR: A failure occurred in build(). Aborting...

I'm currently testing the same build with Node.js 24.21.0 LTS to check if the problem is related to Node.js 26.

Expected behaviour

Mastodon 4.7.2 should build successfully with Yarn 4.18.0 and a supported Node.js version, as specified in the Mastodon package.json.

Actual behaviour

The build fails during the Yarn Link step and aborts.

Detailed description

I'm currently upgrading my Mastodon installation to 4.7.2 on Arch Linux.

The Ruby/Bundler part of the build completes successfully:

Bundle complete! 155 Gemfile dependencies, 278 gems now installed.

The problem occurs during the JavaScript dependency installation. My PKGBUILD runs:

corepack enable --install-directory . yarn ./yarn install --immutable

My environment when the build failed was:

Node.js: 26.8.2 Yarn: 4.18.0 Corepack: 0.36.0

I checked the package.json included with Mastodon 4.7.2. It specifies Yarn 4.18.0 and Node.js >=22, so these versions should normally be supported.

During the Yarn Link step, I first get this warning:

YN0066: typescript@patch:@typescript/typescript6@npm%3A6.0.2... ENOENT: no such file or directory, lstat '/node_modules/typescript/lib/_tsc.js'

Yarn then crashes with:

Error: The "onCancel" handler was attached after the promise settled.

The build ends with:

Node.js v26.8.2 ==> ERROR: A failure occurred in build(). Aborting...

I initially thought this could be related to Yarn, but Mastodon 4.7.2 explicitly requires Yarn 4.18.0, which is exactly the version being used.

I'm now testing the build with Node.js 24.21.0 LTS (nodejs-lts-krypton on Arch Linux) instead of Node.js 26.8.2.

If necessary, I can also test with Node.js 22 LTS.

At this point I'm not sure whether the issue is related to Node.js 26, Yarn 4.18.0, or the TypeScript 6 patch warning appearing just before the crash.

Mastodon instance

mastodon.lli.be

Mastodon version

4.7.1

Environment

OS: Arch Linux Kernel: Linux 7.2.4-arch1-2 Architecture: x86_64 CPU: Intel Xeon Processor (Skylake, IBRS, no TSX) Node.js: 26.8.2 (when the issue occurred) Yarn: 4.18.0 Corepack: 0.36.0 Mastodon: 4.7.2

Node.js package: nodejs 26.8.2-1

Currently testing with: nodejs-lts-krypton 24.21.0-1 (Node.js 24 LTS)

Technical details

Mastodon: 4.7.2 OS: Arch Linux (x86_64) Kernel: 7.2.4-arch1-2 Node.js: 26.8.2 Yarn: 4.18.0 Corepack: 0.36.0 Ruby/Bundler: build completes successfully Installation method: Arch Linux PKGBUILD

CPU: Intel Xeon (Skylake)

Currently testing with Node.js 24.21.0 LTS (nodejs-lts-krypton 24.21.0-1).

Source: mastodon/mastodon

View original on GitHubView discussion on GitHub