The complete error log is : D:\Jscript\node\pageopen.js:12
ph.createPage(function(err,page){
^
TypeError: Cannot call method 'createPage' of undefined
at D:\Jscript\node\pageopen.js:12:7
at D:\Jscript\node\node_modules\node-phantom\node-phantom.js:65:6
at null._onTimeout (D:\Jscript\node\node_modules\node-phantom\node-phantom.js:43:5)
at Timer.listOnTimeout as ontimeout
I am trying to run below code and getting error "ph.create page of undefined ". Please tell me where I am missing something.
var http=require('http'); var phantom=require('node-phantom');
var server=http.createServer(function(request,response){ response.writeHead(200,{"Content-Type": "text/html"}); response.end('
Hello World'); }).listen();phantom.create(function(error,ph){
The complete error log is : D:\Jscript\node\pageopen.js:12 ph.createPage(function(err,page){ ^ TypeError: Cannot call method 'createPage' of undefined at D:\Jscript\node\pageopen.js:12:7 at D:\Jscript\node\node_modules\node-phantom\node-phantom.js:65:6 at null._onTimeout (D:\Jscript\node\node_modules\node-phantom\node-phantom.js:43:5) at Timer.listOnTimeout as ontimeout