roam-research-private-api icon indicating copy to clipboard operation
roam-research-private-api copied to clipboard

puppeteer / macos

Open thomasschindler opened this issue 4 years ago • 2 comments
trafficstars

I'm running into an issue when installing on macos. Help is very much appreciated!

npm ERR! code 1 npm ERR! path /opt/homebrew/lib/node_modules/roam-research-private-api/node_modules/puppeteer npm ERR! command failed npm ERR! command sh -c node install.js npm ERR! The chromium binary is not available for arm64: npm ERR! If you are on Ubuntu, you can install with: npm ERR! npm ERR! apt-get install chromium-browser npm ERR! npm ERR! /opt/homebrew/lib/node_modules/roam-research-private-api/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112 npm ERR! throw new Error(); npm ERR! ^ npm ERR! npm ERR! Error npm ERR! at /opt/homebrew/lib/node_modules/roam-research-private-api/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112:19 npm ERR! at FSReqCallback.oncomplete (node:fs:198:21) npm ERR! npm ERR! Node.js v17.0.1

thomasschindler avatar Nov 05 '21 12:11 thomasschindler

For others who might run into this: this is a specific problem on osx mit M1 https://linguinecode.com/post/how-to-fix-m1-mac-puppeteer-chromium-arm64-bug

thomasschindler avatar Nov 09 '21 14:11 thomasschindler

Workaround available for M1 Macs -- see my full comment, but excerpt is below https://github.com/puppeteer/puppeteer/issues/5662

I ended up patching the os.arch() at the following path, homebrew/lib/node_modules/roam-research-private-api/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js

chromeExecutable = '/opt/homebrew/bin/chromium';

Quezion avatar Jan 04 '22 19:01 Quezion