-
-
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
registration[1] is not a function #2192
Comments
Note that this is a duplicate of #2185. I will try to take a look at this later. |
I am looking at this now. This is due to race conditions / timing issues in the named-register extra. Your code works in systemjs@6.2.5, but not in >=6.2.6. The reason is that in 6.2.6 we switched from a full tick of the event loop (setTimeout task) to a microtask within the event loop (Promise.resolve) for resetting the firstNamedDefine variable. You can read more about that at #2144, #2139, and #2138. The named-register extra has had a history of being buggy and having timing issues. Over the last year, there have been a variety of efforts to fix it:
Due to this long history of painful bugs, we've started encouraging people not to use the named-register extra if they can avoid it. In typescript, this can be done by switching from That said, even though named-register is generally discouraged, we still support it. I have worn myself out trying to fix that extra in the last year with several dozens of hours that still haven't resulted in the extra fully functioning, and do not plan on spending more time on it. So I'd appreciate community help on this. |
@joeldenning , thanks for the quick response. Can you suggest me a good bundler for SystemJS files that are generated by typescript outDir format?. I tried rollup, but I think it doesn't understand files which "system.register" format. |
Rollup works very well - webpack works as well. Here are the options I'd consider:
You mentioned some confusion about the System.register format - it is a way of representing |
thank you. closing the issue |
Question
I am using typescript outfile with systemJS.
registration[1] is not a function
I followed #1886 but still having the problem.
Repo details - https://github.com/yln99517/MyMathLib
you can try here - https://yln99517.github.io/MyMathLib/
The text was updated successfully, but these errors were encountered: