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
The earlier fallback chain still failed in CI because npm's arborist
crashes on bun's hoisted node_modules layout (paths containing '+') and
on nested packages that reference the yarn/bun 'workspace:' protocol
(e.g. crossws in docs-site/node_modules). The previous --legacy-peer-deps
attempt walked into those paths and produced:
npm error Cannot read properties of null (reading 'matches')
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type 'workspace:': workspace:*
Add a 3rd attempt that runs `npm install --package-lock-only` in a
fresh mkdtemp directory containing only package.json. With no
hoisted node_modules to walk, npm builds a clean ideal tree and emits
a valid lockfile. On success the generated lockfile is copied back to
the project root before the temp dir is removed.
The previous ESM/require typo was also fixed: switch the file's
imports to ESM (mkdtempSync, copyFileSync, tmpdir, join) since the
.mjs extension forces ESM scope and require() throws ReferenceError.
Verified locally: `bun run security:audit` regenerates a fresh
package-lock.json in ~3 min and exits 0 (1 high [astro, allowlisted],
0 critical, 11 moderate). Re-runs reuse the fresh lockfile and exit
in <1s.
0 commit comments