Puppeteer error
I get this error when I try to run my action with puppeteer code:
Error: Could not find Chrome (ver. 135.0.7049.84). This can occur if either..
Already ran "npx puppeteer browsers install chrome"
In another node.js project I have the code working, but not in my wasp project.
4 Replies
Hi @Viktor S. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I don't see specific information about Puppeteer errors in the provided knowledge sources. However, I can offer some general troubleshooting advice based on what we know about Wasp and Node.js compatibility.
The error you're encountering might be related to Node.js version compatibility. Based on the knowledge sources, Wasp has specific Node.js version requirements:
1. In older versions of Wasp, only Node.js 18 was supported
2. In newer versions (from Wasp 0.12 onward), Node.js versions >= 18 are supported
If you're using a newer version of Node.js (like Node.js 20) with an older version of Wasp, this could potentially cause compatibility issues with dependencies like Puppeteer.
You could try:
1. Checking your Wasp version with
wasp version
2. Using Node.js 18 specifically with your Wasp project by using NVM: nvm use 18
Discord support thread: Node version conflict between wasp and astro
3. Running wasp clean
and then wasp start
to remove old node_modules and reinstall dependencies
If you're still experiencing issues after trying these steps, it might be worth sharing more details about your Wasp version and Node.js version for further troubleshooting.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Viktor S, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?wasp version: 0.16.2
node.js version: 20.11.1
puppeteer version: ^24.6.1
You are trying to run the action in some Pupeteer code? Are you trying to run the client or the server action? Please share as much code a possible for us to understand the issue
I went through the learning experience of using puppeteer with Wasp a month or so ago. I had the same errors. Disclaimer: I'm new to puppeteer and relatively new to node, wasp, and docker.
I might be the last to learn this, but the puppeteer versions are bound to specific versions of the browsers. If you have it working in a different project on your machine, the first thing I'd check is that your wasp project's versions of puppeteer and puppeteer core are exactly the same as the other project.
Also newbie me had significant problems getting puppeteer and its dependencies / versions working in the provided alpine container and eventually I just set up my own container (bookworm I think?) to sidestep it all.