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.

release: incorrect sourcemaps

See original GitHub issue

In previous releases like alpha.4, the sourcemap paths were correctly resolved in relative to the transpiled file.

This has changed in alpha.5.

//# sourceMappingURL=/usr/local/google/home/jelbourn/material2/tmp/broccoli_type_script_compiler-input_base_path-IydvmmBU.tmp/0/components/slide-toggle/slide-toggle.js.map

Since, the sourcemap paths are not valid anymore, SystemJS is not able to create a bundle of Angular Material 2 components. (applies also to the CLI - uses SystemJS builder as well).

I temporary fixed this, by stripping the souremap paths out of the components.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
benjaminkittcommented, May 27, 2016

Stripping out sourcemap paths works, as per @DevVersion. Quick cmd to do so:

Linux:

cd ./node_modules/@angular2-material
find . -type f -exec sed -i 's/\/\/# \S*jelbourn\/material2\S*/ /g' {} +

FreeBSD/OSX:

cd ./node_modules/@angular2-material
find . -type f -exec sed -i '' 's/\/\/# \S*jelbourn\/material2\S*/ /g' {} +
4reactions
netmikeycommented, Jun 16, 2016

@guybedford Have you managed to make it work?

Just using the most recent SystemJS version (0.19.31 right now) in my package.json and rebuilding with ng build -e prod doesn’t seem to fix it, still getting the error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next + SWC appear to generate incorrect sourcemaps #39878
Next generates different sourcemaps when we switch between using Babel to transpile our code, and SWC. The SWC sourcemaps are incorrect - the ......
Read more >
Source map errors — Firefox Source Docs documentation
The source map data can be invalid — either not a JSON file at all, or with an incorrect structure. Typical error messages...
Read more >
Troubleshooting Source Maps for JavaScript
For uploaded source maps to be located and applied, the release needs to be created by the CLI or API (and the correct...
Read more >
Source Maps - SurviveJS
When your source code has gone through transformations, debugging in the browser becomes a problem. Source maps solve this problem by providing a...
Read more >
Source Map Troubleshooting - Rollbar Docs
Sometimes source maps can be generated with no content in them, or in an invalid format, e.g. base64. Check the source maps that...
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