Skip to content

Warnings when debugging in VS Code #24349

@breyed

Description

@breyed

What version of Next.js are you using?

10.1.3

What version of Node.js are you using?

v14.16.1

What browser are you using?

Safari

What operating system are you using?

macOS

How are you deploying your application?

Vercel

Describe the Bug

Debugging a starter Next.js installation shows several warnings. Even if they are benign, they make it hard to notice other warnings that may appear as the project is developed.

VS Code shows the following on the Debug Console:

Could not read source map for file:///Users/brey/Code/Sandbox/nextjs-test/node_modules/@next/react-refresh-utils/ReactRefreshWebpackPlugin.js: ENOENT: no such file or directory, open '/Users/brey/Code/Sandbox/nextjs-test/node_modules/@next/react-refresh-utils/ReactRefreshWebpackPlugin.js.map'
Could not read source map for file:///Users/brey/Code/Sandbox/nextjs-test/node_modules/@next/react-refresh-utils/loader.js: ENOENT: no such file or directory, open '/Users/brey/Code/Sandbox/nextjs-test/node_modules/@next/react-refresh-utils/loader.js.map'
Could not read source map for file:///Users/brey/Code/Sandbox/nextjs-test/node_modules/@next/react-refresh-utils/internal/ReactRefreshModule.runtime.js: ENOENT: no such file or directory, open '/Users/brey/Code/Sandbox/nextjs-test/node_modules/@next/react-refresh-utils/internal/ReactRefreshModule.runtime.js.map'

Expected Behavior

No warnings.

To Reproduce

  1. npx create-next-app nextjs-test --use-npm
  2. Add to packages.json in scripts: "debug": "NODE_OPTIONS='--inspect' next dev",.
  3. Create .vscode/launch.json with:
{
	"version": "0.2.0",
	"configurations": [
		{
			"type": "node",
			"request": "attach",
			"name": "Launch Program",
			"skipFiles": ["<node_internals>/**"],
			"port": 9229,
			"cwd": "${workspaceFolder}/Server"
		}
	]
}
  1. npm run debug
  2. Run this command in VS Code: Debug: Start Debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasy to fix issues, good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions