2

When I first tried to install puppeteer through npm, I got errors saying permission is denied for the .local-chromium folder. So I followed this SO post and that error went away, but now there is another (base path is omitted):

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

> puppeteer@5.2.1 install ##########/node_modules/puppeteer
> node install.js

(node:25349) ExperimentalWarning: The fs.promises API is experimental
Downloading Chromium r782078 - 126.4 Mb [====================] 100% 0.0s 
ERROR: Failed to set up Chromium r782078! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
{ [Error: EEXIST: file already exists, mkdir '##########/node_modules/puppeteer/.local-chromium/linux-782078']
  errno: -17,
  code: 'EEXIST',
  syscall: 'mkdir',
  path:
   '##########/node_modules/puppeteer/.local-chromium/linux-782078' }
npm WARN notsup Unsupported engine for puppeteer@5.2.1: wanted: {"node":">=10.18.1"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: puppeteer@5.2.1
npm WARN notsup Unsupported engine for extract-zip@2.0.1: wanted: {"node":">= 10.17.0"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: extract-zip@2.0.1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@5.2.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the puppeteer@5.2.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ######/.npm/_logs/2020-07-30T16_32_37_096Z-debug.log

But that directory doesn't exist, nor does puppeteer at all within node_modules so I can't delete it and retry. I'm not sure what the installation is reffering to. Does anybody have any idea what it could mean?

Also, this is irrelevant but another concern is with the warnings saying that a node version >=10.18.1 is wanted and so 10.4.0 is unsupported, any ideas what's up with that as well?

1 Answers1

1

I ended up using nvm to switch to the stable Node release (10.18.1) which resolved both the errors and the warnings. I guess there was some incompatibility with newer Node versions.