docker-puppeteer icon indicating copy to clipboard operation
docker-puppeteer copied to clipboard

How do I make my project use the included puppeteer npm package?

Open joadr opened this issue 5 years ago • 1 comments

Hello, After building with this image I found out that I was around 1.5 GB, I found out that it has a puppeteer v3 installed on it, so I removed the puppeteer v2 from my package.json but now I get that puppeteer is not installed.

Any idea on how to make it work with the included version?

thanks

joadr avatar May 20 '20 20:05 joadr

@joadr try to add puppeteer as an optional project dependency:

npm i puppeteer --save-optional

# or

yarn add puppeteer --optional

Then, in the image, install the dependencies excluding the optional ones:

npm i --no-optional

# or

yarn install --no-optional

By doing this, puppeteer is part of the project, but not installed.

joaocarmo avatar Aug 25 '20 14:08 joaocarmo