Closed jordymeow closed 7 years ago
I ran into this also. You can resolve the issue by running jspm i --dev npm:source-map-support
.
I'm not sure what the right way to go about fixing the problem is because it's not listed as a dependency in TypeScript's package.json but from looking at the source code, the compiler is conditionally requiring it by wrapping it in a try block but that doesn't work in the browser environment where it results in an async 404.
This was introduced at some point during development of 2.1
The simplest solution is probably to modify the override in the jspm registry.
@frankwallis what do you think?
Thank you @aluanhaddad, indeed it works fine. Would be great to know why we need to install it, and why it's not listed as a dependency.
I think the reason that it's not listed as a dependency is that it is intended to be optional. The way that optionality is handled is via a try catch block around what is assumed to be a synchronous require.
From my limited understanding, I don't think that is really something SystemJS and jspm can reasonably be expected to detect and even if they could, the only thing that could preserve the behavior would be a non-trivial source transform.
I could be completely wrong and the issue could instead be related to other dependencies that are deliberately omitted from TypeScript via the jspm registry override.
@guybedford is my interpretation correct or is there a known way that jspm has for handling this scenario?
This should fix the issue temporarily https://github.com/jspm/registry/pull/997
@jordymeow This should be fixed now.
@aluanhaddad I will test it tomorrow, thanks a lot :)
Hello,
I am not sure it's really related to plugin-typescript but it always happen when I am trying to load my files through the typescript loader. My code is available here: https://github.com/jordymeow/meowbs-2016. I get this error in the Chrome console when I run this project. Do you have any idea what's happening?