Possible Vercel platform bug 🤷‍♂️

Hi

I’m using PNPM v11.9.0 with a pnpm-workspace.yaml file in a non-monorepo project. This file is needed and used now starting from pnpm v11 for non-monorepo projects too.

I get this error when deploying:

ERROR packages field missing or empty

The workaround was to add this to pnpm-workspace.yaml file:

packages:
    - "."

Failing: https://vercel.com/babakfp-projects/babakfp/AbnTMTY7nFxPmqkuhTwZ5mowBxoJ
Passing: https://vercel.com/babakfp-projects/babakfp/3eHvsQDrMgiBhTy4FTCrS7QqR6G9

I don’t need help, just letting you guys know :man_shrugging:.

:waving_hand::blush:


Edit

It seems like I may have explained myself bad. Vercel did recognize that I use PNPM and Vercel did use PNPM to install packages. I do have "packageManager": "pnpm@11.9.0". So the issue or workaround isn’t to get Vercel recognize the project PM as PNPM.

The issue is, Vercel things my repo is a monorepo because it contains pnpm-workspace.yaml file. But the repo is not a monorepo. It’s just a single SvelteKit app located in the root of the repo. So I had to use that trick to fix that vercel deployment error. In dev in local everything works fine, but the issue only on vercel.

Hi babakfp,

Nice catch, and thanks for posting the workaround.

This does look like a good minimal repro for Vercel’s pnpm workspace detection. pnpm 11’s docs say pnpm-workspace.yaml can be used for project configuration, and if packages is omitted, only the root package is included in the workspace. So a non-monorepo project with a workspace file but no packages field should be a valid pnpm shape.

Your workaround makes the workspace explicit:

packages:
  - "."

That seems like the safest temporary fix because it tells any build tooling that reads pnpm-workspace.yaml that the root package is the only workspace package.

For the Vercel side, the useful minimal reproduction would probably be:

package.json
pnpm-lock.yaml
pnpm-workspace.yaml

where pnpm-workspace.yaml contains only the pnpm 11 config you need, with no packages field. If that fails on Vercel but works locally with the same pnpm version, that points pretty clearly at Vercel’s parser/detection path rather than the app build itself.

The pnpm workspace docs mention the omitted-packages behavior here:

Just saw another post related to this. If you’re using Corepack you can specify the packageManager in package.json