1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M1macにてpuppeteerのchromiumエラーが出る

Posted at

備忘

M1macにてyarn upgradeを行おうとしたらエラーが発生した。

エラー内容

error /Users/XXXXX/node_modules/puppeteer: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /Users/XXXXX/node_modules/puppeteer
Output:
The chromium binary is not available for arm64: 
If you are on Ubuntu, you can install with: 

 apt-get install chromium-browser

/Users/XXXXX/node_modules/puppeteer/lib/BrowserFetcher.js:112
            throw new Error();

対策

chromiumをインストールする

$ brew install chromium

.zprofileに以下の内容を記載する

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=`which chromium`

リロード

$ source ~/.zprofile
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?