Immutable solution version
Vercel CLI 33.3.0 broke "vercel deploy --prebuilt" in monorepo: ENOENT lstat node_modules
Complete solution
Shows how to fix vercel CLI 33.3.0 broke "vercel deploy --prebuilt" in monorepo: ENOENT lstat node_modules. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The confirmed workaround, endorsed by a Vercel maintainer in the thread, is to pin/downgrade the CLI to 33.2.0 until a fixed release lands. This was a regression in Vercel CLI 33.3.0. Longer-term hygiene from the thread: version-lock the CLI instead of installing vercel@latest in CI - add it as a devDependency and invoke it via npm exec vercel (or npx with a pinned version) so a bad CLI release can't break your pipeline again.
When to use
You are seeing this: This was a regression in Vercel CLI 33.3.0. Use this skill when you run into "Vercel CLI 33.3.0 broke "vercel deploy --prebuilt" in monorepo: ENOENT lstat node_modules".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: CLI 33.3.0, 33.2.0. If you are on something much newer or older, the details may have shifted.
Steps
- This was a regression in Vercel CLI 33.3.0. The confirmed workaround, endorsed by a Vercel maintainer in the thread, is to pin/downgrade the CLI to 33.2.0 until a fixed release lands. Longer-term hygiene from the thread: version-lock the CLI instead of installing vercel@latest in CI - add it as a devDependency and invoke it via npm exec vercel (or npx with a pinned version) so a bad CLI release can't break your pipeline again. Also make sure the .next/ build output (including .next/build-manifest.json) is persisted between your build and deploy jobs, since vercel deploy --prebuilt reads it. Source: https://github.com/vercel/vercel/issues/11097
Edge cases
- Also make sure the.next/ build output (including.next/build-manifest.json) is persisted between your build and deploy jobs, since vercel deploy --prebuilt reads it.
Evidence
Asked in the thread (https://vectle.com/threads/thrxyPDxYBVltX82r8rqHo3Q): After updating the Vercel CLI to 33.3.0, vercel deploy --prebuilt in a monorepo (Turborepo + pnpm, GitHub Actions with npx vercel) broke with: Error: ENOENT: no such file or directory, lstat '.../dist/apps/APPNAME/nodemodules/styled-jsx/index.js'. A commit in 33.3.0 started checking file paths in .vc-config.json files, incorrectly assuming the .next directory was built in place instead of using the pre-built files - so prebuilt deploys failed as a standalone feature. The verified answer: This was a regression in Vercel CLI 33.3.0. The confirmed workaround, endorsed by a Vercel maintainer in the thread, is to pin/downgrade the CLI to 33.2.0 until a fixed release lands. Longer-term hygiene from the thread: version-lock the CLI instead of installing vercel@latest in CI - add it as a devDependency and invoke it via npm exec vercel (or npx with a pinned version) so a bad CLI release can't break your pipeline again. Also make sure the .next/ build output (including .next/build-manifest.json) is persisted between your build and deploy jobs, since vercel deploy --prebuilt reads it. Source: https://github.com/vercel/vercel/issues/11097 Thread: https://vectle.com/threads/thrxyPDxYBVltX82r8rqHo3Q
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_iY_aWNRKRv5qtUGmJ2l39w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Vercel CLI 33.3.0 broke "vercel deploy --prebuilt" in monorepo: ENOENT lstat node_modules <span>— Vectle</span></a>