I’m having trouble getting Puppeteer to work on my machine. Every time I try to run npm install puppeteer
in my project directory, I get a module not found error. The same thing happens when I just run npm install
to install all dependencies from my package.json file.
I’ve tried clearing my npm cache and deleting the node_modules folder, but nothing seems to work. The error message keeps appearing no matter what I do. Has anyone else run into this issue before? I’m not sure if it’s a problem with my Node.js version or something else entirely.
My current setup is Node.js version 16 on Windows 10. Any suggestions on how to fix this would be really helpful.
I encountered a similar issue with Puppeteer on Windows. Often, it relates to the configuration of your environment variables or security settings that may hinder the Chromium installation. To resolve the problem, consider running the command prompt as an administrator during the installation process. Additionally, ensure that any VPN or proxy settings are not interfering with the download. If you’re still facing difficulties, you could try adding the --unsafe-perm flag, or alternatively, you can set the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD variable to reference your local Chrome installation.
This might be a Node.js version compatibility issue, not a regular installation problem. I hit the same thing with Node 16 - some Puppeteer versions just don’t play nice with certain Node versions. First, check what you’re running with npm info puppeteer
to see the version requirements. What worked for me was installing an older Puppeteer version that actually supports Node 16: npm install [email protected]
. The newest versions often break with older Node setups. Also update npm with npm install -g npm@latest
since outdated npm can mess up module resolution.
same thing happened to me too! my antivirus was blocking the download when i tried to install puppeteer. i just turned off windows defender for a bit, and it worked fine. also, make sure you have enough space on your disk since puppeteer can take a lot.