user11783767
user11783767

Reputation:

Installing puppeteer throws error with "Failed to install script 'node install.js'"

I am trying to install puppeteer, but it gives me following error message:

npm ERR! Failed at the [email protected] install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.

Both node and npm are up to date. How can I fix this?

Upvotes: 5

Views: 25218

Answers (2)

Sudarshan
Sudarshan

Reputation: 814

we can do

npm install --unsafe-perm=true

if package.json already contains the puppteer config's.

Upvotes: 1

theDavidBarton
theDavidBarton

Reputation: 8871

Your Node version is v8.10.0 which is not compatible with puppeteer 4.0.1 that you are trying to install.

Since puppeteer 3.0.0 Node.js v8.x.x is no longer supported.

You have two options:

  1. Upgrading to Node v10.18.1+ on your Linux system (from Node.js downloads, latest LTS version: 12.18.1, or if you need multiple Node versions at the same time you can use Node Version Manager (NVM)).
  2. Installing the last version of puppeteer which was supported on Node v8.10.0. It was puppeteer 2.1.1 and can be installed with:
npm install [email protected]

or if you wouldn't be sure which one was the latest 2.x.x version: you can use ^:

npm install puppeteer@^2.0.0

Of course like this you'd loose some functionality and need to make sure using this docs version: https://pptr.dev/#?product=Puppeteer&version=v2.1.1

Upvotes: 1

Related Questions