element-hq / element-hq/compound

Compound doesn't build with latest Yarn version

Open
#407 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
24
Forks
7
PR merge metrics
No merged PRs in 30d

Description

When [updating](https://github.com/element-hq/sre-internal/issues/3576) Cloudflare Pages build to v3, the build failed. Cloudflare Pages v1 used Ubuntu20 with default Yarn v1.22.4 while Cloudflare Pages v3 is using Ubuntu22 with default Yarn v1.22.22.

Setting `YARN_VERSION=1.22.4` in Cloudflare succeed again with Pages build v3.

No immediate issue but we have an old yarn version that will keep getting older hardcoded in Cloudflare.

Note that currently Cloudflare Pages [build v3](https://developers.cloudflare.com/pages/configuration/build-image/#limitations) doesn't support reading yarn version from `yarn.lock`

```
2026-07-09T08:24:14.828758Z ➤ YN0000: · Yarn 4.9.1
2026-07-09T08:24:14.8478Z ➤ YN0000: ┌ Resolution step
2026-07-09T08:24:20.14708Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT Packing @vector-im/compound-design-tokens@https://github.com/element-hq/compound-design-tokens.git#commit=6e33c5bf3cbb4c29dbe5fc063d24b375849c0fac from sources
2026-07-09T08:24:20.267495Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT Using Yarn Classic for bootstrap. Reason: "__metadata" key not found in yarn.lock, must be a Yarn classic lockfile
2026-07-09T08:24:20.268907Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT
2026-07-09T08:24:21.029183Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT ➤ YN0000: Downloading https://classic.yarnpkg.com/latest.js
2026-07-09T08:24:21.473689Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT ➤ YN0000: Saving the new release in .yarn/releases/yarn-classic.cjs
2026-07-09T08:24:21.563025Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT ➤ YN0000: Done in 0s 544ms
2026-07-09T08:24:21.646872Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT
2026-07-09T08:24:22.226014Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT yarn install v1.22.22
2026-07-09T08:24:22.272519Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDERR (node:3479) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
2026-07-09T08:24:22.2729Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDERR (Use `node --trace-deprecation ...` to show where the warning was created)
2026-07-09T08:24:22.364974Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT [1/4] Resolving packages...
2026-07-09T08:24:22.469891Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT [2/4] Fetching packages...
2026-07-09T08:25:22.629126Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDERR warning @zip.js/zip.js@2.8.26: The engine "deno" appears to be invalid.
2026-07-09T08:25:22.629516Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDERR warning @zip.js/zip.js@2.8.26: The engine "bun" appears to be invalid.
2026-07-09T08:25:22.629599Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT [3/4] Linking dependencies...
2026-07-09T08:25:22.632556Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDERR warning "style-dictionary > @bundled-es-modules/memfs > memfs@4.57.3" has unmet peer dependency "tslib@2".
2026-07-09T08:25:35.232138Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT [4/4] Building fresh packages...
2026-07-09T08:25:35.458022Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT Done in 73.24s.
2026-07-09T08:25:35.543006Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT
2026-07-09T08:25:36.00295Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT yarn pack v1.22.22
2026-07-09T08:25:36.027651Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDERR (node:3529) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
2026-07-09T08:25:36.028467Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDERR (Use `node --trace-deprecation ...` to show where the warning was created)
2026-07-09T08:25:36.768141Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT success Wrote tarball to "/tmp/xfs-e8228cd6/package.tgz".
2026-07-09T08:25:36.768564Z ➤ YN0000: │ /tmp/xfs-e8228cd6 STDOUT Done in 0.77s.
2026-07-09T08:25:38.845767Z ➤ YN0085: │ + @babel/core@npm:8.0.1, @babel/preset-env@npm:8.0.2, @babel/preset-react@npm:8.0.1, @babel/preset-typescript@npm:8.0.1, @storybook/addon-docs@npm:10.4.6, and 674 more.
2026-07-09T08:25:38.884424Z ➤ YN0000: └ Completed in 1m 25s
2026-07-09T08:25:38.886022Z ➤ YN0000: ┌ Post-resolution validation
2026-07-09T08:25:38.88618Z ➤ YN0002: │ @vector-im/compound@workspace:. doesn't provide @types/react (pf7f18), requested by @storybook/addon-docs and other dependencies.
2026-07-09T08:25:38.886299Z ➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code.
2026-07-09T08:25:38.886509Z ➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
2026-07-09T08:25:38.933186Z ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.
2026-07-09T08:25:38.933573Z ➤ YN0000: └ Completed
2026-07-09T08:25:38.933691Z ➤ YN0000: · Failed with errors in 1m 25s
2026-07-09T08:25:39.053236Z Error: Exit with error code: 1
2026-07-09T08:25:39.053618Z at ChildProcess. (/snapshot/dist/run-build.js)
2026-07-09T08:25:39.053716Z at Object.onceWrapper (node:events:652:26)
2026-07-09T08:25:39.053893Z at ChildProcess.emit (node:events:537:28)
2026-07-09T08:25:39.054102Z at ChildProcess._handle.onexit (node:internal/child_process:291:12)
2026-07-09T08:25:39.061616Z Failed: build command exited with code: 1
2026-07-09T08:25:39.854526Z Failed: error occurred while running build command
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue mentions yarn.lock and the Cloudflare Pages v3 build; start by reproducing the logged install with the current configuration and inspect how the Pages build selects Yarn. Done means the Pages v3 build completes without a forbidden lockfile modification, without relying on the hardcoded Yarn 1.22.4 workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.