Reputation: 21
I have installed casperjs npm module in nodejs. Also installed phantomjs npm package before casperjs. Installed using "npm install casperjs --save" But got an exception "Cannot find module casper"
var casper = require('casper').create();
Upvotes: 0
Views: 433
Reputation: 2406
You simply cannot use CasperJS in NodeJS.
Quote from official docs:
While CasperJS is installable via npm, it is not a NodeJS module and will not work with NodeJS out of the box. You cannot load casper by using require(‘casperjs’) in node. Note that CasperJS is not capable of using a vast majority of NodeJS modules out there.
For more details read this links from official documentation:
Is CasperJS a node.js library?
Upvotes: 3