Vercel not picking up packageManager from package json

I have a build that i am upgrading to pnpm v10. i enabled the ENABLE_EXPERIMENTAL_COREPACK=1 and now i am getting error WARN! Warning: Could not enable corepack because package.json is missing “packageManager” property
so my lockfile is not working

where does vercel try to read the packageManager from? i have it in root level, monorepo folder, specific package as well

I have my build logs if necessary to show.

I just tried a fresh install of the Turbopack basic example, it comes default with packageManager only on the project root and successfully read this when building with ENABLE_EXPERIMENTAL_COREPACK=1

Putting it additionally on the specific package did not seem to break anything

Can you share more about your project setup so we can debug further?

I am constantly switching the flag on/off now as it breaks all the builds.

Here’s my root directory setup (tried to cleanup some folders)

Bold feat/eslint-improvements ? ❯ lt
drwxr-xr-x    - grokgrok  6 Oct 20:19 -N  .
lrwxrwxrwx    - grokgrok 16 Sep 10:14 -- ├──  AGENTS.md -> CLAUDE.md
.rw-r--r--  14k grokgrok 16 Sep 10:14 -- ├──  CLAUDE.md
.rw-r--r-- 1.9k grokgrok  6 Oct 12:46 -- ├──  Dockerfile
drwxr-xr-x    - grokgrok 13 Sep 18:27 -- ├──  e2e
.rw-r--r--  34k grokgrok 13 Sep 18:27 -- │   ├──  package-lock.json
.rw-r--r--  574 grokgrok 13 Sep 18:27 -- │   ├──  package.json
.rw-r--r-- 2.9k grokgrok 13 Sep 18:27 -- │   ├──  playwright.config.ts
drwxr-xr-x    - grokgrok 13 Sep 18:27 -- │   ├── 󰣞 src
.rw-r--r--  743 grokgrok 13 Sep 18:27 -- │   └──  tsconfig.json
drwxr-xr-x    - grokgrok  6 Oct 20:19 -N ├──  monorepo
drwxr-xr-x    - grokgrok 13 Sep 18:27 -N │   ├──  apps
.rw-r--r--  181 grokgrok  5 Oct 15:36 -- │   ├──  eslint.config.js
drwxr-xr-x    - grokgrok  6 Oct 20:19 -I │   ├──  node_modules
.rw-r--r-- 1.4k grokgrok  6 Oct 19:32 -- │   ├──  package.json
drwxr-xr-x    - grokgrok 13 Sep 18:27 -- │   ├──  packages
drwxr-xr-x    - grokgrok  3 Oct 11:03 -- │   ├──  patches
.rw-r--r-- 1.9M grokgrok  6 Oct 19:32 -- │   ├──  pnpm-lock.yaml
.rw-r--r--  161 grokgrok 13 Sep 18:27 -- │   ├──  pnpm-workspace.yaml
.rw-r--r--  209 grokgrok 13 Sep 18:27 -- │   ├──  prettier.config.js
.rw-r--r-- 2.4k grokgrok 13 Sep 18:27 -- │   ├── 󰂺 README.md
.rw-r--r-- 2.0k grokgrok  6 Oct 19:03 -- │   └──  turbo.json
.rw-r--r--  353 grokgrok  6 Oct 18:00 -- ├──  package.json
.rw-r--r--  13k grokgrok  6 Oct 18:00 -- ├──  pnpm-lock.yaml
.rw-r--r-- 2.4k grokgrok 13 Sep 18:27 -- ├── 󰂺 README.md
.rw-r--r--  496 grokgrok 13 Sep 18:27 -- ├── 󰉼 renovate.json
drwxr-xr-x    - grokgrok 13 Sep 18:27 -- ├──  scripts
.rw-r--r--  640 grokgrok 13 Sep 18:27 -- │   ├──  ...
drwxr-xr-x    - grokgrok 13 Sep 18:27 -- ├──  terraform
drwxr-xr-x    - grokgrok 13 Sep 18:27 -- │   ├──  ...

Notice i have a top level package.json and a package.json inside the monorepo folder.

Both have "packageManager": "pnpm@10.18.0",

And for example one of the projects is setup like this

I think the issue happens though before the install command since the warning about corepack appears before that

✓ Proceeding with deployment
Running "vercel build"
Vercel CLI 48.2.0
WARN! Warning: Could not enable corepack because package.json is missing "packageManager" property
Running "install" command: `cd  ../../ && python3 -m pip install setuptools && pnpm install --frozen-lockfile`... 

Here’s one example site – Deployment Overview – Vercel (not sure you have access or how to give)

For anyone having the same problem. i changed by install command to be `corepack activate && corepack pnpm install --frozen-lockfile` and it goes through. Still unsure why Vercel build can’t see the package manager correctly as its clearly there.

1 Like

As a note, corepack activate seems to not be a valid command, but corepack enable might be what you meant?

I also had to prefix my pnpm build build command with corepack to get this to work.