tilemill icon indicating copy to clipboard operation
tilemill copied to clipboard

Crash due to jsdom dependency

Open IvanSanchez opened this issue 11 years ago • 7 comments

When trying to run from source, I'm hit with the following error message:

$ js index.js 

/home/ivan/tilemill/node_modules/bones/node_modules/jquery/node-jquery.js:5
  window = window || require('jsdom').jsdom().createWindow();
                                              ^
TypeError: Object [ null ] has no method 'createWindow'
    at create (/home/ivan/tilemill/node_modules/bones/node_modules/jquery/node-jquery.js:5:47)

Tracing the error it's easy to work around the problem:

$ cd tilemill/node_modules/bones/node_modules/jquery/node_modules
$ npm remove jsdom
$ npm install [email protected]

I wonder if this can be fixed at a mapbox/tilemill level, or at a developmentseed/bones level (tweaking the package.json), or we have to wait for the node-jquery team to fix this.

IvanSanchez avatar Aug 22 '14 11:08 IvanSanchez

This happened to me too. Your workaround worked perfectly, thank you.

dmfrancisco avatar Aug 28 '14 12:08 dmfrancisco

When deploying, shouldn't it be possible to specify exactly what versions of modules you want, akin to Gemfile.lock?

pnorman avatar Sep 07 '14 20:09 pnorman

Yes, it's high time we shrinkwrap: http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shrinkwrap/

springmeyer avatar Sep 07 '14 20:09 springmeyer

Bumping into this issue with https://github.com/mapbox/tilestream, too, thanks google and @IvanSanchez.

erictheise avatar Sep 07 '14 22:09 erictheise

@erictheise thanks for the heads up. I will see if I can fix tonight. What day is your workshop?

springmeyer avatar Sep 07 '14 22:09 springmeyer

8am tomorrow, but, hey, no pressure. I'm showing them SimpleHTTPServer after running mb-util so we have a fallback. It'd also be cool to get the node 0.8.15 language out of the docs as it can make one wonder if it only works with an older version. Thanks @springmeyer!

erictheise avatar Sep 07 '14 22:09 erictheise

@erictheise @pnorman @dmfrancisco - 9c1a2b2 should fix.

springmeyer avatar Sep 08 '14 00:09 springmeyer