question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No sourcemaps generated for 'ng serve' with angular-cli 1.5.2

See original GitHub issue

Sourcemaps stopped working for dev builds using ng serve in my app after upgrading to angular-cli 1.5.

I tested this by creating a pristine project and the same thing happens, there seem to be no sourcemaps available over the development server. A regular ng build does create the .map files.

Versions

Angular CLI: 1.5.2
Node: 8.4.0
OS: win32 x64
Angular: 5.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.2
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.36
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.2
@schematics/angular: 0.1.5
typescript: 2.4.2
webpack: 3.8.1

Repro steps

  • Step 1 npm install -g @angular/cli
  • Step 2
ng g test-app
cd test-app
  • Step 3 ng serve

Observed behavior

No sourcemaps are availbale over the dev server. e.g. http://localhost:4200/main.bundle.js.map -> 404 not found

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
phillashworthcommented, Nov 17, 2017

Thanks @clydin, the browser debugger (Chrome or Firefox) does not seem to pick up these integrated source maps and just displays the minified code. I’m not sure how to go about debugging the code, setting breakpoints etc. Any suggestions would be much appreciated.

6reactions
AbakumovAlexandrcommented, Nov 24, 2017

@filipesilva, the workaround of using sources under the webpack:// node is working in Chrome/FF, but it isn’t great because ‘Search all sources’ doesn’t work. You have to navigate webpack:// tree every time you need to set a breakpoint instead of quickly searching for desired line across your project in browser’s DevTools.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 11 - ng serve - Option "sourceMap" is deprecated
Option "sourceMap" is deprecated: Use the "sourceMap" option in the browser builder instead. The warning is not presented in ng build . Here...
Read more >
Configuring sourcemaps with the Angular CLI
You can configure sourcemaps generation for the different targets (e.g., serve, production, etc) through the angular.json file: ... "architect": ...
Read more >
Chapter 1. Introducing Angular - liveBook · Manning
Generate a new single-page web app in seconds using Angular CLI ... The ng serve command builds the bundles in memory without generating...
Read more >
Compare Versions | tnp-models | npm - Open Source Insights
We found errors while resolving dependencies that may result in an incomplete or inaccurate dependency graph. Show details. Errors found while resolving some ......
Read more >
www.sing-group.org/dt/gitlab/mrjato/daaexample/com...
+ +## Further help + +To get more help on the Angular CLI use `ng help` or go ... No newline at end...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found