-
-
Notifications
You must be signed in to change notification settings - Fork 255
npm:ractive-load #115
Comments
@victorwpbastos following up from jspm/npm#39 (comment): I think you're jumping a few steps - the first thing is to just get Test out:
With a simple page to load Then there will be an error, specifically I'm getting:
I don't have time to help with this, but when I do I will. |
Yes, then I installed github:ractive, required it before ractive-load and everything works in runtime but in bundle not. |
@victorwpbastos ok I see. Yes, just requiring ractive before ractive-load is not enough, as you need to ensure the dependency is defined at a modular level. This is where you should use shim configuration to enforce the dependency https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm#shim-configuration. |
Also, perhaps use ractive-load from GitHub as well then? |
Basically, something like
|
Yes this is a race condition that is only affecting you on the server as the dependency on |
So by now there is no way to do that? |
This will be fixed by applying the shim override like the above example in my previous comment. |
After that I could install ractive-load running: |
Yes exactly. |
I wanna help. How could I do that? |
I'd suggest trying to follow the suggestion in #115 (comment) and see where it breaks. Read about overrides in detail at https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm#shim-configuration. |
@victorwpbastos any luck with that? I'm having the exactly same problem. But I'm not using ractive-node but rcu. rcu is a dep used by ractive-load. @guybedford suggestion didn't worked. |
I came back to webpack until this is resolved.
|
I wonder if that's something that @Rich-Harris could help and change in the library side. |
So I made some progress. Enforcing CJS as a format for rcu ( "format cjs" ) and instaling github:jspm/nodelibs-module and requiring it at the top of the file made it work until:
But that's OK, seems a library error, so commented the line in ractive@0.7.2:7400
then the build completes. Not a lot of changes to make. What you guys think? |
In fact I'm using handlebars again. Ractive seems a little work in progress. I hope they keep the good work. Looks promising! |
The problem with |
@guilhermeaiolfi thanks for updating here. I've just added an experimental feature to jspm at jspm/jspm-cli#670, which would allow shim to apply to any module format. With this feature, such an install can be accomplished with:
This is breaking though, so won't be released too soon unfortunately, but let me know if it looks like that will help here. |
So, it worked for me: System.config({
meta: {
'github:ractivejs/rcu@0.4.0/dist/rcu': {
deps: ['module'],
format: 'cjs'
}
}
}); It took me a while until I understood how 'meta' works because it matches files and not modules names (at least in this case). DO NOT WORK: System.config({
meta: {
'rcu': { // 'github:ractivejs/rcu@0.4.0' won't work either
deps: ['module'],
format: 'cjs'
}
}
}); I hope it helps someone else. You can close this issue for now. Thanks for the tips. |
See jspm/npm#39 (comment).
The text was updated successfully, but these errors were encountered: