hiroppy / fusuma

✍️ Fusuma makes slides with Markdown easily.
https://hiroppy.github.io/fusuma
5.39k stars 195 forks source link

NPM Install fails: The chromium binary is not available for arm64 #687

Open tjex opened 11 months ago

tjex commented 11 months ago

Info

Type

For Bugs

running npm i --verbose fusuma -D results in errors: The errors relate to a chromium binary not being available. I shouldn't have to have a chromium binary on my system to run this in the first place I would think?

Installing with yarn results in the same error. But ... installing with bun works, and running it too 🤷‍♂️

npm verb Darwin 22.6.0
npm verb node v20.5.1
npm verb npm  v10.2.0
npm ERR! code 1
npm ERR! path /Users/tjex/docs/presentations/ctech_pr-2023-10/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!  sudo apt install chromium
npm ERR!
npm ERR!
npm ERR!  sudo apt install chromium-browser
npm ERR!
npm ERR! /Users/tjex/docs/presentations/ctech_pr-2023-10/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115
npm ERR!                     throw new Error();
npm ERR!                     ^
npm ERR!
npm ERR! Error
npm ERR!     at /Users/tjex/docs/presentations/ctech_pr-2023-10/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115:27
npm ERR!     at FSReqCallback.oncomplete (node:fs:200:21)
npm ERR!
npm ERR! Node.js v20.5.1
npm verb exit 1
npm verb unfinished npm timer reify 1696950551613
npm verb unfinished npm timer reify:build 1696950556488
npm verb unfinished npm timer build 1696950556489
npm verb unfinished npm timer build:deps 1696950556490
npm verb unfinished npm timer build:run:install 1696950556512
npm verb unfinished npm timer build:run:install:node_modules/puppeteer 1696950556512
npm verb unfinished npm timer build:run:install:node_modules/pa11y/node_modules/puppeteer 1696950556516
npm verb unfinished npm timer build:run:install:node_modules/watchpack-chokidar2/node_modules/fsevents 1696950556517
npm verb code 1
tjex commented 11 months ago

Bun fails to build the project, and references the same module as npm / yarn does originally. Pupeteer.

Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT

    at onClose (/Users/tjex/docs/presentations/ctech_pr-2023-10/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
    at ChildProcess.<anonymous> (/Users/tjex/docs/presentations/ctech_pr-2023-10/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:185:85)
    at ChildProcess.emit (node:events:514:28)
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
error: "fusuma" exited with code 1 (SIGHUP)

So it's again down to the chromium-browser not being installed... The readme states that we can use Chrom or Firefox. So I'm not sure what's going on.