These are chat archives for DDMAL/RodanClient-deprecated-

8th
Jun 2015
evan magoni
@magoni
Jun 08 2015 18:40
wooo
Andrew Horwitz
@ahwitz
Jun 08 2015 18:40
okay so
ryan I ran into the same issue and it looks like it was solved with the most recent config.js file
and redoing libs if necessary
evan magoni
@magoni
Jun 08 2015 18:42
what hankinson did initially to solve the Deferred error was to specifically require jquery for backbone.marionette using something like this https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm#shim-configuration
Andrew Horwitz
@ahwitz
Jun 08 2015 18:42
he also a comment onthat issue that you linked me to
evan magoni
@magoni
Jun 08 2015 18:42
that change should be already there in the config.js that we're using
Ryan Bannon
@mrbannon
Jun 08 2015 18:43
But the config.js is auto-generated when doing a jspm install of the package.json file.
Andrew Horwitz
@ahwitz
Jun 08 2015 18:43
it is?
evan magoni
@magoni
Jun 08 2015 18:43
oh really? whoah
Ryan Bannon
@mrbannon
Jun 08 2015 18:44
Yeah
Andrew Horwitz
@ahwitz
Jun 08 2015 18:44
holy crap you're right
Ryan Bannon
@mrbannon
Jun 08 2015 18:44
ahh, but In the config, I can see that backbone is mapping to 1.2.1
It needs to be 1.1.2 or less...
Hmm...why is it doing that.
Andrew Horwitz
@ahwitz
Jun 08 2015 18:45
it just installed as 1.1.2 for me
FUCK I'm still getting the deferred error, there was just another on top of it instead of below it
Ryan Bannon
@mrbannon
Jun 08 2015 18:50
I'm thinking that node_modules, web/libs, and config.js have to be wiped
I'm trying that now
Andrew Horwitz
@ahwitz
Jun 08 2015 18:51
didn't think about going all the way down to node_modules, but let me know
Ryan Bannon
@mrbannon
Jun 08 2015 18:52
Damn...wtf is going on.
That didn't work
Andrew Horwitz
@ahwitz
Jun 08 2015 18:54
okay, but that did fix my other issue
so thanks for suggesting that at the very least
Andrew Hankinson
@ahankinson
Jun 08 2015 18:57
Are you getting $.Deferred not found?
Andrew Horwitz
@ahwitz
Jun 08 2015 18:58
yeah, and working through the various suggestions in the issue you commented on to no avail
Andrew Hankinson
@ahankinson
Jun 08 2015 18:58
Did you see this?
jspm/registry#234
ah right
Ryan Bannon
@mrbannon
Jun 08 2015 18:58
Getting "Cannot read property 'Deferred' of undefined"
Andrew Hankinson
@ahankinson
Jun 08 2015 18:58
That just means it can't resolve $
which is jQuery
which means it can't import jQuery
because it doesn't know about it.
Andrew Horwitz
@ahwitz
Jun 08 2015 18:59
so I've added an init.js file that calls my app main in which it resets Backbone.$, but that still doesn't work
Andrew Hankinson
@ahankinson
Jun 08 2015 18:59
did you try jspm install marionette instead of jspm install backbone.marionette?
and make sure you removed the old marionette configuration?
Andrew Horwitz
@ahwitz
Jun 08 2015 19:00
we were using the automatic setup from package.json - I didn't remove the old config, but doing that led to some other issues
i'll try that now
Ryan Bannon
@mrbannon
Jun 08 2015 19:00
Here's what I've done (and it seems to be working):
wipe web/libs
wipe web/config.js
remove version info for backbone and marionette in package.json
jspm install
It looks like backbone 1.2.1 has fixed the issue.
(I could be wrong, because I'm now resolving new errors associated with my app code, but I'm not getting backbone errors anymore.)
Andrew Horwitz
@ahwitz
Jun 08 2015 19:02
which errors?
Ryan Bannon
@mrbannon
Jun 08 2015 19:02
For my app code? I'm using 'this' before calling 'super()' in my constructors.
Andrew Hankinson
@ahankinson
Jun 08 2015 19:03
It's because they're now import jQuery I think
Andrew Horwitz
@ahwitz
Jun 08 2015 19:04
ryan, to make sure, can you copy your jspm dependencies to this window
should be towards the end of package.json
Ryan Bannon
@mrbannon
Jun 08 2015 19:04
"jspm": {
"directories": {
"baseURL": "web",
"lib": "web",
"packages": "web/libs"
},
"dependencies": {
"babel": "npm:babel@^5.2.17",
"backbone": "npm:backbone@^1.2.1",
"backbone.marionette": "npm:backbone.marionette@^2.4.1",
"backbone.radio": "npm:backbone.radio@^0.9.0",
"jquery": "npm:jquery@^2.1.3",
"twbs/bootstrap": "github:twbs/bootstrap@^3.3.2",
"underscore": "npm:underscore@^1.8.3"
},
"devDependencies": {
"traceur": "github:jmcriffey/bower-traceur@0.0.88",
"traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.88"
}
}
Andrew Horwitz
@ahwitz
Jun 08 2015 19:04
oh you did hardcode them
Ryan Bannon
@mrbannon
Jun 08 2015 19:04
No, I didn't!
Hmm...
Andrew Horwitz
@ahwitz
Jun 08 2015 19:05
yeah i'm still getting the same error with 1.2.1 and 2.4.1
ah cause it's giving me 1.1.2, 1.2.0, and 1.2.1 in $ROOT/libs
Ryan Bannon
@mrbannon
Jun 08 2015 19:06
Give me a few minutes...
Andrew Horwitz
@ahwitz
Jun 08 2015 19:08
AH
Andrew Hankinson
@ahankinson
Jun 08 2015 19:08
yes?
Andrew Horwitz
@ahwitz
Jun 08 2015 19:08
BECAUSE MARIONETTE IS STILL IMPORTING 1.1.2
I moved 1.1.2 and 1.2.0 to a different directory and Marionette said it was still looking for 1.1.2
any idea how to force version numbers with jspm?
Ryan Bannon
@mrbannon
Jun 08 2015 19:08
haha..still getting same error...only had the other crap because traceur is active
Andrew Horwitz
@ahwitz
Jun 08 2015 19:12
GOT IT
WHOOO
so
in config.js, change the Marionette requirement from 'backbone@1.1.2' to 'backbone@1.2.1'
and you may need to change the others as well (I did) but I think that's the imperative one
Andrew Hankinson
@ahankinson
Jun 08 2015 19:13
Even easier:
blow away node_modules
Andrew Horwitz
@ahwitz
Jun 08 2015 19:13
whomp whomp taking my glory
Ryan Bannon
@mrbannon
Jun 08 2015 19:13
I tried that.
Andrew Hankinson
@ahankinson
Jun 08 2015 19:13
remove any backbone/jquery stuff from your package.json file
Andrew Horwitz
@ahwitz
Jun 08 2015 19:14
tried mine or andrew's?
Andrew Hankinson
@ahankinson
Jun 08 2015 19:14
so that your jspm dependencies look like:
Ryan Bannon
@mrbannon
Jun 08 2015 19:14
Removing node_modules
Andrew Hankinson
@ahankinson
Jun 08 2015 19:14
"dependencies": {
      "sinon": "npm:sinon@^1.13.0",
      "twbs/bootstrap": "github:twbs/bootstrap@^3.3.2"
    }
or whatever
npm install will re-do your node modules
then jspm install marionette, jspm install backbone, jspm install npm:backbone.radio
Should give you a dependencies section like:
"dependencies": {
      "backbone": "npm:backbone@^1.2.1",
      "backbone.radio": "npm:backbone.radio@^0.9.0",
      "jquery": "npm:jquery@^2.1.3",
      "marionette": "github:marionettejs/backbone.marionette@^2.4.1",
      "sinon": "npm:sinon@^1.13.0",
      "twbs/bootstrap": "github:twbs/bootstrap@^3.3.2"
    }
Andrew Horwitz
@ahwitz
Jun 08 2015 19:15
someone make the pull request/commit and send me an updated package.json/config.js :+1:
Andrew Hankinson
@ahankinson
Jun 08 2015 19:16
Pull request where?
Andrew Horwitz
@ahwitz
Jun 08 2015 19:17
to RodanClient?
I was half-joking since I got it working anyway
Andrew Hankinson
@ahankinson
Jun 08 2015 19:17
what are you working on?
Andrew Horwitz
@ahwitz
Jun 08 2015 19:17
trying to set up this environment for myself for something down here
ssssshhhh
Andrew Hankinson
@ahankinson
Jun 08 2015 19:17
is it really a secret?
Andrew Horwitz
@ahwitz
Jun 08 2015 19:17
no, not at all
I'm gonna post a note on the JSPM issue saying it's solved in 1.2.1
Andrew Hankinson
@ahankinson
Jun 08 2015 19:18
ok