niutech / node.php

Run node.js apps from PHP even on a shared hosting!
817 stars 235 forks source link

Run Phantomjs & casper JS #22

Closed AndreaGelmini closed 8 years ago

AndreaGelmini commented 8 years ago

Hello I am They try to run phantomjs with casperjs on my shared hosting but I'm having some problems. keeps giving me this error

`Starting: node 'node_modules/casperjs' Done. PID=572210 module.js:341 throw err; ^

Error: Cannot find module '/xxxxx/xxxxx/public_html/node_modules/casperjs' at Function.Module._resolveFilename (module.js:339:15) at Function.Module._load (module.js:290:25) at Function.Module.runMain (module.js:447:10) at startup (node.js:141:18) at node.js:933:3`

Can you help me out? I do not understand how to run the scripts.

niutech commented 8 years ago

PhantomJS and CasperJS are standalone binaries, not Node JS scripts, so they will not work using node.php. However, you can edit function node_start in file node.php to run casperjs instead of node.

AndreaGelmini commented 7 years ago

But I have downloaded and installed from npm

https://www.npmjs.com/package/phantomjs https://www.npmjs.com/package/casperjs

and everything went well .. ergo should run.

I have some doubts. However

PS. I can not understand how I should change the start function.

can you help out?