Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: npm install error caused by install chromium #1711

Closed
Junezm opened this issue Apr 14, 2022 · 4 comments
Closed

Bug: npm install error caused by install chromium #1711

Junezm opened this issue Apr 14, 2022 · 4 comments

Comments

@Junezm
Copy link

Junezm commented Apr 14, 2022

Lexical version: 0.2.0

Steps To Reproduce

  1. git clone repo
  2. npm install

Link to code example:

The current behavior

Command: node install.js
Arguments:
Directory: /Users/frontend/editor/lexical/node_modules/puppeteer
Output:
The chromium binary is not available for arm64.
If you are on Ubuntu, you can install with:

sudo apt install chromium

sudo apt install chromium-browser

/Users/frontend/editor/lexical/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115
throw new Error();

The expected behavior

the package link-preview-generator unused, so I remove it, then I can install successful

@trueadm
Copy link
Collaborator

trueadm commented Apr 14, 2022

Try running your terminal with compatibility mode if you're using an M1 machine. That's what I have to do. Then everything works great :)

@trueadm trueadm closed this as completed Apr 14, 2022
@shijie-todd
Copy link

How to run terminal with compatibility mode ?

@kevinansfield
Copy link
Collaborator

kevinansfield commented Aug 23, 2022

If anyone else runs into this, note that you can install chromium manually via homebrew and set some env vars to point puppeteer at the right place meaning you don't have to have everything installing/running in compatibility mode. The instructions here work well https://linguinecode.com/post/how-to-fix-m1-mac-puppeteer-chromium-arm64-bug

@Timebutt
Copy link
Contributor

Timebutt commented Oct 5, 2022

I ran into the same problem this morning and dropped a PR to resolve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants