phantomjs: unknown module system -


phantomjs version 1.4 (the newest version available through apt). have single js file, content:

var page = require('webpage').create(); var system = require('system'); 

when run it, with:

phantomjs testscript.js 

i error:

undefined:0 unknown module system require() 

what mean? causes it? trying run example https://github.com/ariya/phantomjs/blob/master/examples/direction.js, can't seem simplest thing work. there way read command line arguments using system?

update latest version (1.9.1). see: how can setup & run phantomjs on ubuntu?

or compile own version:

sudo apt-get update sudo apt-get install build-essential chrpath git-core libssl-dev libfontconfig1-dev git clone git://github.com/ariya/phantomjs.git cd phantomjs git checkout 1.9 ./build.sh 

note need symlink /usr/bin/ etc build dir


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -