[Bug] Could not find expected browser (chrome) locally after `next start`
See original GitHub issueEnvironment
next-api-og-image: 2.1.1
next: 11.1.2 / 12.0.4
node: 16.13.0
MacOS 12.0.1 (M1 Chip) VS Code
Bug Description
This package works fine in dev mode when using next dev
. But if I try to run next build & next start
I’m getting this error when trying to access the API route:
Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (901912).
at ChromeLauncher.launch (/Users/romanzhuravlov/Documents/GitHub/next-api-og-image/example/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.js:88:27)
at async Object.apiResolver (/Users/romanzhuravlov/Documents/GitHub/next-api-og-image/example/node_modules/next/dist/server/api-utils.js:101:9)
at async Server.handleApiRequest (/Users/romanzhuravlov/Documents/GitHub/next-api-og-image/example/node_modules/next/dist/server/next-server.js:770:9)
at async Object.fn (/Users/romanzhuravlov/Documents/GitHub/next-api-og-image/example/node_modules/next/dist/server/next-server.js:661:37)
at async Router.execute (/Users/romanzhuravlov/Documents/GitHub/next-api-og-image/example/node_modules/next/dist/server/router.js:205:32)
at async Server.run (/Users/romanzhuravlov/Documents/GitHub/next-api-og-image/example/node_modules/next/dist/server/next-server.js:841:29)
at async Server.handleRequest (/Users/romanzhuravlov/Documents/GitHub/next-api-og-image/example/node_modules/next/dist/server/next-server.js:292:20)
Tried both with my own project and examples from the repo example
folder.
npm install
doesn’t help:

Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Could not find expected browser chrome locally - Stack Overflow
Error: Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (884014). Tried "npm install" ...
Read more >Could not find expected browser (chrome) locally. Run npm ...
Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (938248). When using serverless-esbuild plugin ...
Read more >Puppeteer.js Error: Could not find expected browser (chrome ...
Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (1022525).
Read more >Puppeteer documentation - DevDocs
Puppeteer is a Node library which provides a high-level API to control Chromium or Chrome over the DevTools Protocol. The Puppeteer API is...
Read more >“Could not find expected browser (chrome) locally. Run `npm ...
Answers related to “Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (970485)”.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @neg4n!
Sorry for the late reply. Just busy with school.
Thank you so much for your response. Installing Google Chrome worked.
However, I’m
notnow stuck on displaying that value on the frontend, or rather how the image formation would work. Could you please help me understand? I’m sorry if this is a lot to ask, but I’m just quite new to this.Thanks!
Edit: Looks like I’ve figured it out. Thanks a lot for this great tool!
Hello @yashasbhat 👋🏻
Do you have Google Chrome installed? The error seems like the browser was not found on your MacOS. I guess its partly my fault that Google Chrome requirement isn’t stated in the README 🙈
Cheers, Igor