ajam / banquo

A node.js screenshot service.
MIT License
17 stars 5 forks source link

removed global phantomjs requirement #3

Closed abenrob closed 8 years ago

abenrob commented 8 years ago

If we add the phantomjs module, we can use node-phantom's 'phantomPath' option. This allows us to avoid the requirement for a global install of an old phantomjs version (and a global install of anything, for that matter.) Helps devs who need different versions of phantomjs, and helps deploy by not having to install phantom on server.

mhkeller commented 8 years ago

That's great, thanks!

mhkeller commented 8 years ago

Forgot to uninstall phantomjs before, testing. Getting the following error. Does the config object need to be passed to create()>

  ph.createPage(openPage);
      ^
TypeError: Cannot read property 'createPage' of undefined
    at createPage (/Users/michael.keller/wrk/code/banquo/src/banquo.js:43:7)
    at /Users/michael.keller/wrk/code/banquo/node_modules/node-phantom/node-phantom.js:65:6
    at null._onTimeout (/Users/michael.keller/wrk/code/banquo/node_modules/node-phantom/node-phantom.js:43:5)
mhkeller commented 8 years ago

Nevermind. It was still picking up the old path. Reinstalling node modules fixed it.