Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js v14.2 creates source map issues with various components in VS Code debugger #65795

Open
andyvanosdale opened this issue May 15, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template. Developer Experience Issues related to Next.js logs, Error overlay, etc.

Comments

@andyvanosdale
Copy link

Link to the code that reproduces this issue

https://github.com/andyvanosdale/nextjs-vscode-debug-read-source-map-issue

To Reproduce

  1. run npx create-next-app
  2. Start the VS Code debugger running the npm script dev
  3. Navigate to the Debug Console tab in VS Code
  4. Load the home page in a browser

Current vs. Expected behavior

Current behavior: VS Code's Debug Console shows this error:

Could not read source map for file:///Users/oz/src/github.com/andyvanosdale/nextjs-vscode-debug-read-source-map-issue/.next/server/vendor-chunks/next.js: ENOENT: no such file or directory, open '/Users/oz/src/github.com/andyvanosdale/nextjs-vscode-debug-read-source-map-issue/.next/server/vendor-chunks/render-from-template-context.js.map'

This also occurs with:

  • link.js.map
  • image-component.map

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020
  Available memory (MB): 65536
  Available CPU cores: 12
Binaries:
  Node: 20.12.2
  npm: 10.5.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.3.0-canary.63 // Latest available version is detected (14.3.0-canary.63).
  eslint-config-next: N/A
  react: 19.0.0-beta-4508873393-20240430
  react-dom: 19.0.0-beta-4508873393-20240430
  typescript: 5.1.3
Next.js Config:
  output: N/A

VS Code:
Version: 1.89.1 (Universal)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:24.611Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.5.0

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

Developer Experience

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

next dev (local)

Additional context

No response

@andyvanosdale andyvanosdale added the bug Issue was opened via the bug report template. label May 15, 2024
@github-actions github-actions bot added the Developer Experience Issues related to Next.js logs, Error overlay, etc. label May 15, 2024
@M-Brico
Copy link

M-Brico commented May 21, 2024

I thought this might be a mono-repo causing issue but only realised late in the day that it was the components. Page and layout debug fine with breakpoints stopping the flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Developer Experience Issues related to Next.js logs, Error overlay, etc.
Projects
None yet
Development

No branches or pull requests

2 participants