vercel / vercel/next.js

getVersionInfo fails behind corporate firewalls

Open
#85,071 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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/vercel-labs/chatgpt-apps-sdk-nextjs-starter

To Reproduce

Run pnpm dev while npm's registry is blocked due to corporate firewall.

Current vs. Expected behavior

It emits a confusing JSON parse warning during development because npm's registry is blocked by a corporate firewall:

SyntaxError: Unexpected token '<', "
<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
Image

This error should not happen on pnpm dev, and instead it should use the registry specified in npmrc to fetch the latest tags.

Provide environment information
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Aug 11 21:15:09 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T6041
  Available memory (MB): 131072
  Available CPU cores: 16
Binaries:
  Node: 22.17.1
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.14.0
Relevant Packages:
  next: 15.5.4 // There is a newer version (15.5.6) available, upgrade recommended!
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
 ⚠ There is a newer version (15.5.6) available, upgrade recommended!
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
Which area(s) are affected? (Select all that apply)

Not sure

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

next dev (local)

Additional context

This issue was introduced by https://github.com/vercel/next.js/pull/67309, which was intended to speed up startups.

Perhaps dev could fallback to the npmrc's registry if the attempt to directly use npm's registry didn't work? Just throwing out an idea.

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

Start by tracing the getVersionInfo path used during pnpm dev, especially the startup change introduced by next.js pull request 67309. Reproduce with npm's registry blocked and an npmrc registry configured, then verify that the development startup avoids the JSON parse warning and uses the configured registry to fetch latest tags.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.