You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build script fails on Windows due to CRLF line endings in pnpm-workspace.yaml #25946
Clone the sentry-javascript repository on a Windows machine.
Ensure Git checks out pnpm-workspace.yaml with CRLF (\r\n) line endings.
Run pnpm install and then pnpm run build
Expected Result
The build processes the workspace packages and runs successfully.
Actual Result
The build crashes immediately with the following error:
[INCONSISTENT WORKSPACES]: The packageslist in pnpm-workspace.yaml and theworkspaces list in package.json must contain the same packages in the same order.
I guess this happens because scripts/verify-packages-versions.js rigidly splits the YAML file using .split('\n'). On Windows, this reads the target string as 'packages:\r', causing the match to fail, returning an empty array and triggering the error.
Additional Context
Suggested Solution:
Update scripts/verify-packages-versions.js to handle both line endings by using a regex split: .split(/\r?\n/)
I can reproduce this. scripts/verify-packages-versions.js splits pnpm-workspace.yaml on '\n' only (line 31), so with a CRLF checkout the header line is packages:\r, lines.indexOf('packages:') returns -1 and the parsed list comes back empty, which is what triggers [INCONSISTENT WORKSPACES].
The fix I'd propose is a one-line change to split on /\r?\n/, plus a small vitest file next to scripts/bump-version.test.ts that runs the script against LF and CRLF copies of the workspace file and against a real mismatch. Locally the CRLF case fails on develop and passes with the change (vitest run scripts/verify-packages-versions.test.ts).
Activity
linear-code commentedon Oct 30, 2026
JS-4047
henricop commentedon Nov 1, 2026
I can reproduce this.
scripts/verify-packages-versions.jssplitspnpm-workspace.yamlon'\n'only (line 31), so with a CRLF checkout the header line ispackages:\r,lines.indexOf('packages:')returns -1 and the parsed list comes back empty, which is what triggers[INCONSISTENT WORKSPACES].The fix I'd propose is a one-line change to split on
/\r?\n/, plus a small vitest file next toscripts/bump-version.test.tsthat runs the script against LF and CRLF copies of the workspace file and against a real mismatch. Locally the CRLF case fails ondevelopand passes with the change (vitest run scripts/verify-packages-versions.test.ts).Would you like a PR for this against
develop?test(build): Add regression test for CRLF workspace parsing
github-actions commentedon Nov 5, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #26083, which was included in the 11.11.0 release.