roam-research-private-api
roam-research-private-api copied to clipboard
puppeteer / macos
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
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
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';