I'm currently struggling with using Phantom.js with a Meteor app of mine. I have it installed on my local machine (Ubuntu 14.04), it's added to my path (I can run it from my terminal), I also ran and installed the smart wrapper for Phantomjs: mrt add phantomjs
.
I can see that in my .meteor > local > build > programs > server > npm
directory there is a phantomjs
directory.
My question is, how do I actually use Phantom? I'm attempting to scrape from the server side of things. I've tried the following things (using coffeescript):
phantom = Npm.require "phantomjs"
phantom = Npm.require "phantom"
phantom = Meteor.require "phantomjs"
phantom = Meteor.require "phantom"
(I've also tried using capital "P's")
All attempts in this way yield: Error: Cannot find module 'phantomjs'
Any clarification would be greatly appreciated!