[Problema] Error puppeteer "Could not find Chromium" SOLVED!!
Atualizei a minha versão do node no docker para a node 18.02 e a versão do PUPPETEER para a mais recente, no ambiente da maquina funciona mas ao subir para o docker acontece o erro abaixo
throw new Error(Could not find Chromium (rev. ${this.puppeteer.browserRevision}). This can occur if either
Error: Could not find Chromium (rev. 1108766). This can occur if either
- you did not perform an installation before running the script (e.g.
npm install
) or - your cache path is incorrectly configured (which is: /root/.cache/puppeteer).
Alguém pode me ajudar?
Tenta adicionar o seguinte no arquivo do Dockerfile
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN apt-get update && apt-get install gnupg wget -y && \
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install google-chrome-stable -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*