Reputation: 1197
I know that CasperJS isn't usable with node directly, but can I not even use a service like cheerio
, a node web scraping tool?
I tried require('cheerio');
and it said not found. So, I did:
proxies/cheerios.js
module.exports = require('cheerio');
tests/file.js
var cheerio = require('../proxies/cheerio.js');
Now, I get:
Error: Cannot find module 'util'
phantomjs://bootstrap.js:289
phantomjs://bootstrap.js:254 in require
Any suggestions? I really need to use this plugin in CasperJS, and SpookyJS isn't working...
Upvotes: 1
Views: 371
Reputation: 1343
It's running on top PhantomJS so if you want to include external libraries you need to inject them into your code.
Upvotes: 1