-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm install -g puppeteer fails #375
Comments
Seems like your global modules are being installed in a place that requires some elevated access. Have you had EACCES issues before? Might consider having global modules installed in a less sensitive place (https://medium.com/@sifium/using-npm-install-without-sudo-2de6f8a9e1a3). Otherwise you might need |
You shouldn't install things globally because they are dependencies. Packages when you install will install all of their dependencies internally. Only install things globally when you use them in your OS level tooling. And even then, quite a bit of tools like eslint and stylelint are well thought through in most tools to not need global installs of them. You'd need to do |
This might be an issue in the installation script that uses default umask for directory creation. I'll take a look. |
Looks like this is related to npm permissions |
This could've been caused by an npm bug that was fixed in: https://github.com/npm/npm/releases/tag/v5.4.1 |
Hmm... I use Win 10 with WSL and start getting these every now and then. |
This command ended up working for me, in case anyone lands here by googling the error:
|
If someone does not work, |
The
And Is telling users to not use system-wide node the only option here? |
Still a bug with |
As @aslushnikov stated earlier, this is indeed related to npm permissions and fixing those gets rid of the error. In my case puppeteer was installed as a regular project dependency and fixing the npm permissions solved the problem. |
I'm not sure that was the issue, I'm using NVM which sets correct npm package permissions (to my knowledge) but I could be wrong. |
I'm using docker and
Docker file to reproduce:
Build command: |
I believe this is an issue with permissions via NPM. I'm also using nvm with node 8.11.3 LTS, and npm 6.3.0 on a Mac. @kat-whittenburg 's solution was what worked for me, as it bypasses the permissions. I was doing this locally however, so it still works if you omit the global flag.
Thank you @kat-whittenburg ! Not a permanent fix, as I still run into permission errors on other packages (I've tried reseting everything, and I think it may have to do with using your fingerprint as a user access), but it works for individual items! |
Try with: |
Found a [similar problem](puppeteer/puppeteer#375 (comment)) with a solution.
#375 (comment) works for me with no side effects |
After trying
On Debian, any idea how to deal? |
@markedphillips The initial lines in your output tell you exactly why it doesn't work:
You need to update your node and npm versions. How to do that properly, depends on what exactly you want to be able to do. Plenty of tutorials are around on how to do that. |
ERROR: Failed to download Chromium r656675! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download. |
I've been able to install with Yes, my PATH is configured properly and this is the only global NPM module that doesn't work. |
While |
Definitely agree there. The command may have worked for me (and, it seems, quite a few other people), but it's in the end a workaround and plays fast and loose with permissions. A true fix is definitely still needed. |
Note that Puppeteer itself is not installed by this Dockerfile, since it shoud be installed in a project local directory. Also, it is so problematic to install Puppeteer globally. See puppeteer/puppeteer#375.
tried everything, still the same error :(( |
it's throwing the error because the |
Try using a proxy if the error is 403 |
In my case, changing the owner and group of ~/.npm and the directory of the node_modules to user works. |
npm install -g puppeteer
returns the following error:Download failed: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/puppeteer/.local-chromium'
Is this expected? I am using it as a dependency of a project I would like to install globally and this is blocking that.
The text was updated successfully, but these errors were encountered: