Closed unional closed 9 years ago
https://github.com/systemjs/systemjs/issues/769#issuecomment-138630414 Reference issue on systemjs
I'm not 100% sure who's at fault here. I would say it's Karma for not passing arrays from the framework (nodejs) to the browser with the proper Array prototype - I would have thought it was using JSON methods to pass the config.client
data.
However it's possible I've misused config.client
for evil.
I could change the framework to encode the SystemJS config as a JSON string, then decode it in the adapter. That should solve the problem for you.
I have created bugs on karma
and socket.io
to track this. I think it is a real bug that should be fixed there. It is great that you have a backup plan on how to get around it. I don't need the fix right now, so let's see will the issue be fixed in time on the other side. :+1:
Hey @unional
I see the issues on karma and socket.io are still open with no recent activity, so I reckon I'll apply the JSON.stringify() -> JSON.parse()
workaround into karma-systemjs
for now.
I guess this is a bug in
karma
and notkarma-systemjs
but I want to bring it up here as I discover and start the conversation fromsystemjs
.A apologize that this is quite long because it was very difficult to trace, so I want to give you as much information as possible.
The resulting bug of this issue is
systemjs
will fail with the following error:After tracing the rabbit for a long time, the problem lies in
meta[module].deps
is not an array after it is loaded inkarma
.As the basis of my example, I have the following in my config:
In
karma-sysmtejs
adaptor.run
:produces:
However, I validate that in
index.js
, at the end of initSystemjs:produces:
Because the
instanceof Array
failed, it fail the following code insystemjs
. Inproto.js
:This cause the
deps
becomes anobject
instead of an array, thus missing theconcat
method and failedsystemjs
.Do you think this is purely
karma
bug?