0

I was trying to install puppeteer using npm -i puppeteer. But i'm geeting error as i dont have admin rights. Is there any way to download the package folder and paste it into my project folder?

I downloaded the files from puppeteer GitHub page, but I'm getting errors and there are many folders. What should be the path? These doesn't seem to work. const puppeteer = require('./puppeteer'); const puppeteer = require('./puppeteer/packages/puppeteer'); Image: Files downloaded from github(these files are under the folder named puppeteer)

  • Why do you need admin rights to run `npm`? Not sure how it is handled on Windows, but maybe you could try installing `npm` again locally (to your user). Otherwise you could try using a minified version of puppeeter, which should include everything bundled into one file. But I strongly disagree doing this. You could also take a look at WSL or ultimately run a virtual machine with an OS with admin privileges – Myzel394 Feb 09 '23 at 18:42
  • 1
    Why not [NVM](https://github.com/nvm-sh/nvm)? – hazg Feb 09 '23 at 18:43
  • I'm using a network computer and it is not allowing me to install. It is trying to install in C:\Windows\node_modules. I'm getting, Error: EPERM: operation not permitted. SO i was wondering if i could paste the puppeteer folder in my project folder. But when i run it gives me error as " puppeteer\packages\puppeteer\lib\cjs\puppeteer\puppeteer.js'. Please verify that the package.json has a valid "main" entry " – justarandomprogrammer Feb 09 '23 at 18:48
  • Sounds like it is trying to install globally. Do you have any permissions or ability to save files anywhere else? Maybe a different network share, or local filesystem. You could try changing the global folder for `npm` as [described on this post](https://stackoverflow.com/questions/19874582/change-default-global-installation-directory-for-node-js-modules-in-windows). There are tons of different answers on that thread alone, let alone the documentation for npm. – treckstar Feb 10 '23 at 01:17

0 Answers0