-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @angular-devkit/build-angulardevkit/build-angular:dev-serverfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Description
Command
serve
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When running ng serve as well as on page reload, the VS Code debug console displays a 404 error message.
I was able to get rid of the error message by setting the resolveSourceMapLocations config option in .vscode/launch.json, but this fix prevents breakpoints from being hit.
Config tested:
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/",
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
],
}Minimal Reproduction
- Create default Angular project:
ng new app --defaults - Open in VS Code:
code app - Press
F5key to use default launch configuration and check the VS Code debug console.
Exception or Error
Could not read source map for http://localhost:4200/@vite/client: Unexpected 404 response from http://localhost:4200/@vite/client.mjs.map: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /@vite/client.mjs.map</pre>
</body>
</html>
[vite] connecting...
client:426
[vite] connected.
client:521
Angular is running in development mode.
core.mjs:30679
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 17.2.0
Node: 18.19.1
Package Manager: npm 10.4.0
OS: linux x64
Angular: 17.2.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1702.0
@angular-devkit/build-angular 17.2.0
@angular-devkit/core 17.2.0
@angular-devkit/schematics 17.2.0
@angular/cli 17.2.0
@schematics/angular 17.2.0
rxjs 7.8.1
typescript 5.3.3
zone.js 0.14.4
Anything else relevant?
No response
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:dev-serverfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix