@vuejs/router pnpm build fails on Apple M1 Pro

Running pnpm build on a fresh clone of https://github.com/vuejs/router causes the following error. pnpm install was successful.

➜  router git:(main) ✗ pnpm build

> @vue/router-root@ build /Users/brandondavis/github.com/router
> pnpm run -r build

Scope: 3 of 4 workspace projects
packages/router build$ rimraf dist && rollup -c rollup.config.js
│
│ src/index.ts → dist/vue-router.mjs...
│ [!] (plugin rpt2) Error: src/globalExtensions.ts:11:16 - error TS2664: Invalid modul
│ 11 declare module '@vue/runtime-core' {
│                   ~~~~~~~~~~~~~~~~~~~
│
│ src/index.ts
│
│     at error (/Users/brandondavis/github.com/router/node_modules/.pnpm/rollup@2.79.1
│     at throwPluginError (/Users/brandondavis/github.com/router/node_modules/.pnpm/ro
│     at Object.error (/Users/brandondavis/github.com/router/node_modules/.pnpm/rollup
│     at RollupContext.error (/Users/brandondavis/github.com/router/node_modules/.pnpm
│     at /Users/brandondavis/github.com/router/node_modules/.pnpm/rollup-plugin-typesc
│     at Array.forEach (<anonymous>)
│     at printDiagnostics (/Users/brandondavis/github.com/router/node_modules/.pnpm/ro
│     at typecheckFile (/Users/brandondavis/github.com/router/node_modules/.pnpm/rollu
│     at Object.<anonymous> (/Users/brandondavis/github.com/router/node_modules/.pnpm/
│     at Generator.next (<anonymous>)
└─ Failed in 1.2s at /Users/brandondavis/github.com/router/packages/router
/Users/brandondavis/github.com/router/packages/router:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  vue-router@4.1.6 build: `rimraf dist && rollup -c rollup.config.js`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

Platform information

  • pnpm version 7.24.3
  • node version v18.12.1
  • OS: MacOS 13.1 (22C65) (M1 Pro)

Related links

I’ve opened https://github.com/vuejs/router/issues/1661 because I believe this is a bug in the contributing guide.