Troubleshooting
-Chromium currently does not provide arm64 binaries for Linux. There are only -binaries for Mac ARM.
Cannot find module 'puppeteer-core/internal/...'
-This can occur if your Node.js version is lower than 14 or if you are using a +
To keep this page up-to-date we largely rely on community contributions. +Please send a PR if you notice something is no longer up-to-date.
Cannot find module 'puppeteer-core/internal/...'
This can occur if your Node.js version is lower than 14 or if you are using a
custom resolver (such as
jest-resolve
). For the former,
we do not support deprecated versions of Node.js. For the latter, usually
upgrading the resolver (or its parent module such as jest
) will work (e.g.
-https://github.com/puppeteer/puppeteer/issues/9121)
Could not find expected browser locally
-Starting from v19.0.0, Puppeteer will download browsers into +https://github.com/puppeteer/puppeteer/issues/9121)
Could not find expected browser locally
Starting from v19.0.0, Puppeteer will download browsers into
~/.cache/puppeteer
using
os.homedir
for better caching
between Puppeteer upgrades. Generally the home directory is well-defined (even
on Windows), but occasionally the home directory may not be available. In this
case, we provide the PUPPETEER_CACHE_DIR
variable which allows you to change
-the installation directory.
For example,
-PUPPETEER_CACHE_DIR=$(pwd) npm install puppeteer
PUPPETEER_CACHE_DIR=$(pwd) node <script-path>
You can also create a configuration file named .puppeteerrc.cjs
(or
-puppeteer.config.cjs
) at the root of your application with the contents
const {join} = require('path');
/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};
You will need to reinstall puppeteer
in order for the configuration to take
+the installation directory.
For example,
PUPPETEER_CACHE_DIR=$(pwd) npm install puppeteer
PUPPETEER_CACHE_DIR=$(pwd) node <script-path>
You can also create a configuration file named .puppeteerrc.cjs
(or
+puppeteer.config.cjs
) at the root of your application with the contents
const {join} = require('path');
/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};
You will need to reinstall puppeteer
in order for the configuration to take
effect. See Configuring Puppeteer for more
-information.
Chrome headless doesn't launch on Windows
-Some chrome policies might -enforce running Chrome/Chromium with certain extensions.
-Puppeteer passes --disable-extensions
flag by default and will fail to launch
-when such policies are active.
To work around this, try running without the flag:
-const browser = await puppeteer.launch({
ignoreDefaultArgs: ['--disable-extensions'],
});
+information.Chrome headless doesn't launch on Windows
Some chrome policies might +enforce running Chrome/Chromium with certain extensions.
Puppeteer passes
--disable-extensions
flag by default and will fail to launch +when such policies are active.To work around this, try running without the flag:
const browser = await puppeteer.launch({
ignoreDefaultArgs: ['--disable-extensions'],
});-Context: issue 3681.
-Chrome doesn't launch on Linux
-Make sure all the necessary dependencies are installed. You can run
ldd chrome | grep not
on a Linux machine to check which dependencies are missing. The +
Chrome doesn't launch on Linux
Make sure all the necessary dependencies are installed. You can run ldd chrome | grep not
on a Linux machine to check which dependencies are missing. The
common ones are provided below. Also, see
https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/linux/debian/dist_package_versions.json
-for the up-to-date list of dependencies declared by the Chrome installer.
Chrome currently does not provide arm64 binaries for Linux. +There are only arm64 binaries for Mac ARM. +That means that Linux binaries downloaded by default will not work on Linux arm64.
Debian (e.g. Ubuntu) Dependencies
ca-certificates
fonts-liberation
libasound2
libatk-bridge2.0-0
libatk1.0-0
libc6
libcairo2
libcups2
libdbus-1-3
libexpat1
libfontconfig1
libgbm1
libgcc1
libglib2.0-0
libgtk-3-0
libnspr4
libnss3
libpango-1.0-0
libpangocairo-1.0-0
libstdc++6
libx11-6
libx11-xcb1
libxcb1
libxcomposite1
libxcursor1
libxdamage1
libxext6
libxfixes3
libxi6
libxrandr2
libxrender1
libxss1
libxtst6
lsb-release
wget
xdg-utils
CentOS Dependencies
alsa-lib.x86_64
atk.x86_64
cups-libs.x86_64
gtk3.x86_64
ipa-gothic-fonts
libXcomposite.x86_64
libXcursor.x86_64
libXdamage.x86_64
libXext.x86_64
libXi.x86_64
libXrandr.x86_64
libXScrnSaver.x86_64
libXtst.x86_64
pango.x86_64
xorg-x11-fonts-100dpi
xorg-x11-fonts-75dpi
xorg-x11-fonts-cyrillic
xorg-x11-fonts-misc
xorg-x11-fonts-Type1
xorg-x11-utils
After installing dependencies you need to update nss
library using this
command
yum update nss -y