last day (14 days later) » 

11:16 AM
0
Q: Error building/deploying tilestream on heroku

miguelsI want to have a tilestream on heroku, I've followed tutorials and I do exactly the same and keep getting a build/compile error. Just added 2 files and one dir: Procfile: web: tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=$PORT --tilePort=$PORT --tiles=./tiles package.json: ...

 
Include 'jsdom' as a dependency in your package.json
 
@laggingreflex Added the "jsdom": "0.8.x" dependency and still won't run
 
Same error even after adding jsdom or a different error?
 
This time no errors during deploy, yet the app immediately crashes even without opening the browser. Post updated with the output
 
As the error says, update your node engine to "node":"0.8.x"in your package.json. Check details in answer given by @SUNDARRAJANK (note that in that answer it's 0.10.x, but you need to update it to 0.8.x )
 
11:16 AM
It's already done the error is the same though.
 
Check my answer. Add "jsdom": "0.***11***.x" as a dependency
 
@laggingreflex used that same code, with the requested versions and still give an error. Updated on main post
 
hello
thanks for the help for starter
 
+ "jsdom":"0.5.7",
+ "xmlhttprequest": "1.5.0",
+ "backbone":"0.3.3",
+ "jquery":"1.6.3",
+ "express":"2.5.11",
+ "connect":"1.9.2",
 
11:18 AM
on the dependencies?
 
doing it
no building errors
 
yet on deploy
still gives a ton of erros
2014-10-18T11:20:29.562521+00:00 heroku[web.1]: Starting process with command `tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=38963 --tilePort=38963 --tiles=./tiles`
2014-10-18T11:20:31.008439+00:00 app[web.1]: /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5
2014-10-18T11:20:31.007503+00:00 app[web.1]:
2014-10-18T11:20:31.011822+00:00 app[web.1]: TypeError: Object [ null ] has no method 'createWindow'
2014-10-18T11:20:31.008789+00:00 app[web.1]: window = window || require('jsdom').jsdom().createWindow();
the package.json are as follows:
Done everything right this time
sorry forgot + "xmlhttprequest": "1.5.0",
2014-10-18T11:22:52.511178+00:00 heroku[web.1]: Starting process with command `tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=3365 --tilePort=3365 --tiles=./tiles`
2014-10-18T11:22:54.350535+00:00 app[web.1]: window = window || require('jsdom').jsdom().createWindow();
2014-10-18T11:22:54.359093+00:00 app[web.1]: TypeError: Object [ null ] has no method 'createWindow'
2014-10-18T11:22:54.348378+00:00 app[web.1]:
2014-10-18T11:22:54.359099+00:00 app[web.1]: at create (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5:47)
with all the correct dependencies
 
Okay, lemme explain to you what's going on. It's a tricky situation
Tilestream uses bones and bones uses jquery and jquery uses jsdom which is what's causing the error
As you see the error causing dependency is 3 levels down
The fix mentioned on the github is manually uninstalling and re-installing the latest version of jsdom down 3 levels
$ cd tilemill/node_modules/bones/node_modules/jquery/node_modules
$ npm remove jsdom
$ npm install jsdom@0.11
This can't be done by just changing your package.json in your app
 
11:26 AM
so locally I can do it
 
but on heroku it's pretty hard
 
Well, you have two options, 1. locally fix the issue and check in the entire node_modules in your app to your repo and upload that to heroku., Not entirely shure yet if that's possible
of some sort of after-deploy script on heroku that does the same thing mentioned in the fix
 
okey, going to check on that
 
~~of~~ or some sort * (typo) that was the second option
hope that helps
 
11:32 AM
it will help for sure :) thnaks
 

last day (14 days later) »