1

I have a Ubuntu 16.04 running on my system where I installed Puppeteer with the following command :

sudo npm install -g puppeteer --unsafe-perm=true

As I can see, the module is installed correctly at /usr/lib/node_modules/puppeteer/.

Now, if I add a file, example.js inside the above mentioned directory and run it with node example.js, I get the correct results, but if the file is placed anywhere else, puppeteer is not found.

Have I missed something, should I add something in the PATH? I want to access puppeteer globally. Thank you.

I checked the question suggested by the user, already have a NODE_PATH pointing to /usr/lib/node_modules. Even tried npm link puppeteer, didn't help.

We are Borg
  • 5,117
  • 17
  • 102
  • 225
  • Possible duplicate of [NodeJS require a global module/package](https://stackoverflow.com/questions/15636367/nodejs-require-a-global-module-package) – Sam Holmes Jul 25 '18 at 11:07
  • Edited main post to reflect changes tried, which didn't work. Thank you. – We are Borg Jul 25 '18 at 11:26

0 Answers0