vercel / vercel/next.js

Dev Server NPM error code ENOWORKSPACES with PNPM 10

Open
#86,841 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

SWC
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/franknoel/next-workspace-swc-issue

To Reproduce
  1. Clone the repo and install the workspace dependencies using pnpm i
  2. Navigate to the Next.js app using cd packages/reproduction-app
  3. Run pnpm dev
Current vs. Expected behavior

The last command should run the dev server normally, but instead it crashes while trying to download SWC.

> next dev
Downloading swc package @next/swc-darwin-arm64... to /Users/X/Library/Caches/next-swc
npm warn Unknown env config "npm-globalconfig". This will stop working in the next major version of npm.
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
npm warn Unknown env config "_jsr-registry". This will stop working in the next major version of npm.
npm warn Unknown env config "minimum-release-age". This will stop working in the next major version of npm.
npm error code ENOWORKSPACES
npm error This command does not support workspaces.
npm error A complete log of this run can be found in: /Users/X/.npm/_logs/2025-12-04T20_44_00_899Z-debug-0.log
Unhandled Rejection: Error: Failed to get registry from "pnpm".
    at ignore-listed frames {
  [cause]: Error: Command failed: pnpm config get registry 
  npm warn Unknown env config "npm-globalconfig". This will stop working in the next major version of npm.
  npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
  npm warn Unknown env config "_jsr-registry". This will stop working in the next major version of npm.
  npm warn Unknown env config "minimum-release-age". This will stop working in the next major version of npm.
  npm error code ENOWORKSPACES
  npm error This command does not support workspaces.
  npm error A complete log of this run can be found in: /Users/X/.npm/_logs/2025-12-04T20_44_00_899Z-debug-0.log
  
      at ignore-listed frames {
    status: 1,
    signal: null,
    output: [
      null,
      <Buffer >,
      <Buffer 6e 70 6d 20 77 61 72 6e 20 55 6e 6b 6e 6f 77 6e 20 65 6e 76 20 63 6f 6e 66 69 67 20 22 6e 70 6d 2d 67 6c 6f 62 61 6c 63 6f 6e 66 69 67 22 2e 20 54 68 ... 576 more bytes>
    ],
    pid: 17033,
    stdout: <Buffer >,
    stderr: <Buffer 6e 70 6d 20 77 61 72 6e 20 55 6e 6b 6e 6f 77 6e 20 65 6e 76 20 63 6f 6e 66 69 67 20 22 6e 70 6d 2d 67 6c 6f 62 61 6c 63 6f 6e 66 69 67 22 2e 20 54 68 ... 576 more bytes>
  }
}

After running pnpm dev again, it throws the following:

> next dev

⚠ Attempted to load /Users/X/next-workspace-swc-issue/node_modules/.pnpm/next@16.1.0-canary.12_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/next-swc-fallback/@next/swc-darwin-arm64/next-swc.darwin-arm64.node, but it was not installed
⚠ Attempted to load @next/swc-darwin-arm64, but it was not installed
⚠ Attempted to load @next/swc-wasm-nodejs, but it was not installed
⚠ Attempted to load @next/swc-wasm-web, but it was not installed
⨯ Failed to load SWC binary for darwin/arm64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
⨯ Failed to load next.config.ts, see more info here https://nextjs.org/docs/messages/next-config-error
Error: Failed to load SWC binary for darwin/arm64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
    at ignore-listed frames
⚠ Attempted to load /Users/X/next-workspace-swc-issue/node_modules/.pnpm/next@16.1.0-canary.12_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/next-swc-fallback/@next/swc-darwin-arm64/next-swc.darwin-arm64.node, but it was not installed
⚠ Attempted to load @next/swc-darwin-arm64, but it was not installed
⚠ Attempted to load @next/swc-wasm-nodejs, but it was not installed
⚠ Attempted to load @next/swc-wasm-web, but it was not installed
⨯ Failed to load SWC binary for darwin/arm64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc

 ELIFECYCLE  Command failed with exit code 1.
Provide environment information
Running `npx --no-install next info` also crashes, here's the output:


Attempted to load /Users/X/next-workspace-swc-issue/node_modules/.pnpm/next@16.1.0-canary.12_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/next-swc-fallback/@next/swc-darwin-arm64/next-swc.darwin-arm64.node, but it was not installed
⚠ Attempted to load @next/swc-darwin-arm64, but it was not installed
⚠ Attempted to load @next/swc-wasm-nodejs, but it was not installed
⚠ Attempted to load @next/swc-wasm-web, but it was not installed
⨯ Failed to load SWC binary for darwin/arm64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
Unhandled Rejection: Error: Failed to load SWC binary for darwin/arm64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
    at ignore-listed frames


As a reference, here's my OS info from another issue I did from this machine:


Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Aug 11 21:16:21 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Which area(s) are affected? (Select all that apply)

SWC

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), Vercel (Deployed)

Additional context

I initially discovered this issue while trying to do the security update for CVE-2025-66478. It was somehow working fine before updating to v15.5.7 on my other project.

It is also crashing during Vercel deployment during the build step. Here's the error output:

@my-project:build: npm error code ENOWORKSPACES
@my-project:build: npm error This command does not support workspaces.
@my-project:build: npm error A complete log of this run can be found in: /vercel/.npm/_logs/2025-12-04T20_20_15_934Z-debug-0.log
@my-project:build: unhandledRejection [Error: Failed to get registry from "pnpm".] {
@my-project:build:   [cause]: [Error: Command failed: pnpm config get registry 
@my-project:build:   npm error code ENOWORKSPACES
@my-project:build:   npm error This command does not support workspaces.
@my-project:build:   npm error A complete log of this run can be found in: /vercel/.npm/_logs/2025-12-04T20_20_15_934Z-debug-0.log
@my-project:build:   ] {
@my-project:build:     status: 1,
@my-project:build:     signal: null,
@my-project:build:     output: [
@my-project:build:       null,
@my-project:build:       <Buffer >,
@my-project:build:       <Buffer 6e 70 6d 20 65 72 72 6f 72 20 63 6f 64 65 20 45 4e 4f 57 4f 52 4b 53 50 41 43 45 53 0a 6e 70 6d 20 65 72 72 6f 72 20 54 68 69 73 20 63 6f 6d 6d 61 6e ... 141 more bytes>
@my-project:build:     ],
@my-project:build:     pid: 270,
@my-project:build:     stdout: <Buffer >,
@my-project:build:     stderr: <Buffer 6e 70 6d 20 65 72 72 6f 72 20 63 6f 64 65 20 45 4e 4f 57 4f 52 4b 53 50 41 43 45 53 0a 6e 70 6d 20 65 72 72 6f 72 20 54 68 69 73 20 63 6f 6d 6d 61 6e ... 141 more bytes>
@my-project:build:   }
@my-project:build: }
@my-project:build:  ELIFECYCLE  Command failed with exit code 1.
@my-project:build: ERROR: command finished with error: command (/vercel/path0/packages/my-project) /vercel/.local/share/pnpm/.tools/pnpm/10.24.0/bin/pnpm run build exited (1)
@my-project#build: command (/vercel/path0/packages/my-project) /vercel/.local/share/pnpm/.tools/pnpm/10.24.0/bin/pnpm run build exited (1)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the linked next-workspace-swc-issue repository by running pnpm i, entering packages/reproduction-app, and running pnpm dev. Compare the SWC download and registry lookup behavior under pnpm 10, then verify both local next dev/build and the reported Vercel build path no longer fail with ENOWORKSPACES or a missing SWC binary.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.