question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Could not find expected browser (chrome) locally after `next start`

See original GitHub issue

Environment

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:

Снимок экрана 2021-11-24 в 16 00 45

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ynbhcommented, Mar 23, 2022

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 not now 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!

1reaction
neg4ncommented, Mar 21, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found