0

I am looking to learn more about phantomjs.

  • installed sudo npm install -g phantomjs

  • installed phantom into my package.json (npm install phantom --save)

  • running phantom js

  • making sure to require phantom in my app.js ** also tried to create a hello.js file

    console.log('hello world');
    phantom.exit();
    

However, my command line shows 'cannot find module events'. When I ran the same syntax in hello.js my command line shows 'cannot open hello.js'.

Am i missing something very simple?

Winnemucca
  • 3,309
  • 11
  • 37
  • 66
  • Not enough information for us to understand. – NarendraSoni Mar 27 '15 at 06:42
  • Please show your complete script. Since you're using the bridge, how about you start with the [example script](https://github.com/sgentle/phantomjs-node#how-do-i-use-it). Code for plain PhantomJS and the bridge will be different. – Artjom B. Mar 27 '15 at 07:28

1 Answers1

-1

If you install any module globally , then according to this link you should link the global module using the npm link command

sudo npm link <MODULeNAME> 
Community
  • 1
  • 1
avinash pandey
  • 1,321
  • 2
  • 11
  • 15