-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Uncaught TypeError: Unexpected anonymous System.register call. #861
Comments
@zeeshanjan82 can you share a test case here at all, or isolate the issue? |
@guybedford It will take me some time to isolate the issue and provide some more details. I will revert back in couple of days. |
I'm getting similar errors and having a hard time isolating them. In my html, I have
And inside ./app.js I have
The error jumps erratically around, sometimes pointing at b, sometimes at c. I can't nail down a testcase. |
This is also happening for me, but only in Firefox. Chrome/Safari/IE11 seem to be unaffected. The issue seems to disappear on FF Dev Edition |
@lyptt are you sure you are running the latest version of SystemJS? |
@guybedford I should be yes, I'm on SystemJS 0.19.5 according to my jspm_packages. |
@lyptt sure, is there anyway you can share a reproducible case for this? |
@guybedford I'll definitely give it a go. The project I found the issue on is a bit complex so I'll have to come up with something a bit simpler |
Thanks, would be appreciated. |
I'm grasping at straws a bit here, but I have this problem in conjuction with issue #873. Trying to track down that issue, the browser points me to an anonymous function call in system.src.js:4573. In the version I am running (0.19.5 Standard), line 4573 is: I'm confused at how I reach line 4573 because it is guarded by the if clause: |
@smcmurray which version of Firefox are you on? Using a version < 41.0.2 didn't come across this but we have two people that started to get this error once Firefox upgraded to 41.0.2. Not sure if that's a culprit but seems suspicious. |
@jmathai, the report above is using Chrome 45.0.2454.101 (64-bit) |
@jmathai, similar results in Firefox 41.0 |
If you're getting this issue, can you try adding this configuration to SystemJS: System.config({ globalEvaluationScope: false }) And let me know if that helps? |
@guybedford same results with globalEvaluationScope: false |
I guess help replicating would be the way forward then. |
I'm able to reproduce in firefox v41.0.2 by simply installing and enabling firebug, can anyone confirm? Will test the globalEvaluationScope fix and report back. @guybedford @jmathai @smcmurray |
@justinwoodcock thanks, this is a Firebug issue, which I've posted in #878. There are of course many other reasons this message can appear, including user error though. |
I'm getting this error but is not related to firefox. I get it with the karma preprocessor and the jade plugin. |
Not sure if it helps, but I'm getting it in Chrome with this source. |
@guybedford getting the same error but with karma see repo: https://github.com/SerkanSipahi/app-decorators
|
I am having the exact same issue as @SerkanSipahi but by running karma on PhantomJS.
The injected files in Karma are:
|
@frapontillo i switched to https://github.com/Workiva/karma-jspm , this works fine for me. See my working state: https://github.com/SerkanSipahi/app-decorators ( master branch or tag test.karma.jspm )
|
Another way this error can occur is if you pass your This will result in something like: System.register([], function (_export) {
"use strict";
return {
setters: [],
execute: function () {
System.config({
});
}
};
}); Which will get you the error. Don't run |
Is it possible you are using a config.js? Can you remove config.js and place it inside a script in index.html? My config.js looked like this: System.register([], function($__export) {
"use strict";
return {
setters: [],
execute: function() {
System.config({map: {'traceur-runtime': '../node_modules/gulp-traceur/node_modules/traceur/bin/traceur-runtime.js'}});
System.import('bootstrap.js').catch(function(response) {
console.error(response);
});
}
};
}); So, the error is true, the module has no name, it is an anonymous module. Best regards, |
My repo (linked above) has the same issue that @tbragaf has just posted. There is no config.js on my machine. Is the comment in #861 (comment) possible explanation of this issue? |
@monokrome I don't see systemjs in your repo. Did you link to the right thing? |
@monokrome |
I am seeing this error on Firefox, not on Chrome though. And restarting FF makes this go away for a while. |
@monokrome Oh I see, you are using concat to add systemjs. Sorry, but I couldn't run the branch. |
I'm also seeing this error on Firefox (40.0.3) and firefox only. I've tried numerous configurations, two things that stood out in all this:
Could this be babel choking on minor js bugs that arise when transpiling in SpiderMonkey but not V8? |
@justin-schroeder is this with Firebug running or not? |
I am running FF 42.0 on OSX and can confirm that adding |
@mnichols thanks for the update... I'm hoping to make that the default in future. |
Seems like I still encounter this issue, with Here is the repo: |
@unional try disabling Firebug entirely? |
I re-test it and somehow it is working now. With and without firebug. And I noticed I actually don't have firebug installed in that environment. Just the basic dev-tool. For reference:
|
I'm experiencing similiarly sounding problems on firefox 43.0 (windows) with jspm 0.16.27.
When i change the order of the includes in the app.js, different files trigger the error. However I haven't managed to track down the specific import at fault yet. (It's not the first import though, which suggests that it's a specific import, doesn't it?) EDIT: Just opened a new tab without changing anything afair and it works. On the first reload in that tab, the same error occured again. Some weird caching behaviour maybe? |
@tbragaf Not sure if this is still helpful, but - as a response to your previous question - the Not sure how much more helpful I can be at this point. I've pretty much given up on SystemJS at this point and have moved to webpack. |
also have same issue by running karma jasmin tests in typesctipt "visual studio" project without jspm |
I've fixed it by using System.import instead of es6 import statement for unit test dependencies. |
Opening debugger triggers cache-related problem: loading fails on libs with AMD support (react, underscore) with error: AMD module file:///C:/path_to_libs/underscore.js did not define
|
It might be related to the dynamic compiling. When I run the exact same setup as mentioned above but loading a bundled app instead, the error is gone. |
Seems like adding map for library in config somehow solves the problem. |
Temporarily fixed this problem, but very strange way. I have a plugin that override fetch method for loading and try to grab file from several paths (prepared path is formed in overriden locate method). When i add some guranteed failed path for load, fetching takes more time than usual and in 9 from 10 cases i can use debugger safely. Example plugin code:
Hope developers that know systemjs code better than me could reproduce and locate the problem. |
I'm getting this error in very simple example and asked a question in stackoverflow: No answer :-( |
The error was happening for me because i was loading the js files from a script tag and also through systemjs. |
I am using Systemjs and angularjs and whenever I load my application which is also using jspm I get this error in the console.
The text was updated successfully, but these errors were encountered: