-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
release: incorrect sourcemaps #541
Comments
Hello, there is the same problem with the overlay contained in @angular2-material/core/overlay/overlay.js |
@vincentpalita Not only the overlay is affected. Generally all distribution files are affected. |
Stripping out sourcemap paths works, as per @devversion. Quick cmd to do so: Linux:
FreeBSD/OSX:
|
@benjaminkitt Is there a convenient solution to strip out these strings or fix them -- perhaps by replacing the problematic path with |
The problem of sourceMap url not being found by systemjs-builder is apparently a bug introduced in its version 0.15.17. Please see the related tickets: systemjs/builder#606 & systemjs/builder#610 I think that is better to do swtich systemjs-builder version instead of modifying the local code of the @angular2-material module. |
Interesting. So when I run I took your advice and replaced 0.15.18 with 0.15.16 for the time being. Thank you. |
@RoxKilly : If the version of package.json differs with the installed one, it will download the version of package.json in favor of the already installed one. Glad it helped :) |
Just to be clear, the working version of systemjs-builder is 0.15.16, not 0.5.16. I got this to work, but only by updating the angular-cli/package.json. Updating my own application's package.json did not work as npm still downloaded the old version for angular-cli. |
@ofuangka thanks for reporting my typo here :) I would recommend to use a npm-shrinkwrap.json as below instead: {
"dependencies": {
"angular-cli": {
"version": "1.0.0-beta.5",
"from": "[email protected]",
"dependencies": {
"systemjs-builder": {
"version": "0.15.16",
"from": "[email protected]"
}
}
}
}
} This allow you to fix a dependency for a module. |
…al2 sourcemaps * Ref: angular/components#541
@vincentpalita In SystemJS Builder |
@devversion, yes I saw that yesterday :) |
@benjaminkitt BTW the FreeBSD command for stripping out source map comment lines didn't work for me (OS X 10.11). Instead I used regex search in Sublime: |
I just added this file to my build process which works really well. #! /bin/bash
# Workaround for https://github.com/angular/material2/issues/541
if [[ "$OSTYPE" == "darwin"* ]]; then
find node_modules/\@angular2-material/ -name "*.js" -exec sed -i "" 's/\/\/# sourceMappingURL=.*\//\/\/# sourceMappingURL=/' {} \;
else
find node_modules/\@angular2-material/ -name "*.js" -exec sed -i 's/\/\/# sourceMappingURL=.*\//\/\/# sourceMappingURL=/' {} \;
fi |
The sourcemap fix on systemjs is not working properly. Basically is not sending the sourceMaps option to all the functions that is needed and that causes the build to fail cause on some cases it still looks for the sourcemap. @guybedford already added a fix for this a couple of days ago but hasn't pushed the new version with that new patch. |
Facing the same issue here as well... Initially the fix angular/angular-cli#847 seemed like the root cause but the source map issue started popping after the fix as mentioned in angular/angular-cli#847 |
The SystemJS builder issue where it was throwing on invalid input source maps is resolved in the latest builder release. |
@guybedford Have you managed to make it work? Just using the most recent SystemJS version (0.19.31 right now) in my |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.
The text was updated successfully, but these errors were encountered: