-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Failed to parse SourceMap in Production #924
Comments
Having same issue! |
The errors are due to the js files having //# sourceMappingURL=*.js.map in them and the source map file not existing on the server. Check your dist folder to see if the .map files exist. If not a work around I've used is to add them to angular-cli-build.js Example:
Then run "ng build" and see if the files now exist. |
This was fixed in #839 and should be in If so, you can follow these steps to update your files to |
@filipesilva I'm still experiencing the issue. Specifically the following when I load the page:
The I had originally created the project with |
@CrisGrec hm.. can you verify that both the local and global angular-cli versions are |
@filipesilva I don't have a global version installed, I build from the local angular-cli in |
Odd... If you can provide me with a repository or detailed reproduction instructions I can try to debug it myself. |
@filipesilva I've fixed the issue. Though the The next issue we faced were |
@CrisGrec I'm still getting Failed to parse SourceMap on those same two files ( I am using This is a brand new fresh install of CLI and nothing in the code changed at all from original scaffolding. |
Guys, same problem here. No .map in the vendor folder and a lot of "Failed to parse SourceMap" message on Chrome. |
@melquic If you're seeing a lot of those errors, chances are you haven't made the changes Felipe mentioned in this issue: #847 . @alexpaluzzi For me the issue was how the web server was configured. It would redirect 404s to the index page. The missing What happens if you try to open the URL where the The solution for me was to disable the redirect and instead return a 404 for |
I did a quick test using the beta.6 and this still seems to be an issue both on a brand new project and my original project which I updated to the latest release of angular-cli The project is hosted on Firebase and the issue only appears for Chrome (although I believe that is because Chrome is the only one with SourceMaps really implemented). You can see the issue at lcfinancialtools.com in the console. |
I misunderstood the issue initially. It seems related to how some servers are serving missing files, and a mention of an missing map file in the prod builds. For instance, on @peterwiebe's example, https://lcfinancialtools.com/vendor/reflect-metadata/Reflect.js.map shows... the app itself. This is exactly what @CrisGrec mentioned. There might be something we can do on CLI's side, namely not reference missing map files. But this is very much a server configuration issue, mind you. Servers should 404 for missing files, not |
Thank you for opening this back up @filipesilva. For the time being, I am deleting the |
Same issue for me in beta 10 with |
Closed as obsolete due to #1455. |
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. |
My informations:
angular-cli: 1.0.0-beta.5
node: 5.10.0
os: linux x64
I got the following issues in console log
Failed to parse SourceMap: https://my-site.com/vendor/reflect-metadata/Reflect.js.map
Failed to parse SourceMap: https://my-site.com/system-config.js.map
Thanks for your support.
The text was updated successfully, but these errors were encountered: