Just crawling a web page like github.com I hit the famous TypeError: 'undefined' is not a function
.
var page = require('webpage').create();
page.open('https://github.com', function() {
phantom.exit();
});
See https://groups.google.com/forum/#!msg/phantomjs/r0hPOmnCUpc/uxusqsl2LNoJ
So exactly how do you fix this problem for someone totally new to PhantomJS?
Do I git clone curjojs/poly and then wrap all my PhantomJS code under poly/function
like https://stackoverflow.com/a/19521355/230884?
I don't see any official documentation on solving this particular issue.