`npm install -g @daisy/ace` fails entirely when puppeteer's browser download fails, though `ace` runs on Electron
- Dominant language
- JavaScript
- Stars
- 98
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Summary**
Installing Ace globally runs puppeteer's postinstall, which downloads `chrome-headless-shell`
(`@daisy/ace` → `@daisy/ace-cli` → `@daisy/ace-axe-runner-puppeteer` → `puppeteer@24.43.1`). When
that download fails, npm aborts the global install and rolls it back, so nothing is installed.
The default `ace` command never uses that browser: `bin/ace.js` loads
`@daisy/ace-axe-runner-electron/bin/ace`. Only `ace-puppeteer` needs it.
**Environment**
- `@daisy/ace` 1.4.6
- Node v25.5.0, npm 11.8.0
- macOS 26.6.2, arm64
**Steps to reproduce**
1. `npm install -g @daisy/ace@1.4.6` on a network where the browser download is interrupted.
**Actual result**
```
npm error command sh -c node install.mjs
npm error **INFO** Skipping Firefox download as instructed.
npm error Error: ERROR: Failed to set up chrome-headless-shell v148.0.7778.97! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm error at downloadBrowser (file:///opt/homebrew/lib/node_modules/@daisy/ace/node_modules/puppeteer/lib/esm/puppeteer/node/install.js:26:15)
npm error [cause]: Error: All providers failed for chrome-headless-shell 148.0.7778.97:
npm error - DefaultProvider: read ECONNRESET
```
Then `@daisy/ace` is gone from the global prefix. In our case it had already been usable while
the install was still running, and it disappeared when npm rolled back.
**Expected result**
The Electron-based `ace` installs and works. A failed download for the Puppeteer runner, which
`ace` does not use, should not take the whole package down with it.
**Workaround**
`PUPPETEER_SKIP_DOWNLOAD=1 npm install -g @daisy/ace@1.4.6` installs cleanly (381 packages).
`ace --version` then reports 1.4.6, and `ace -s -o .epub` writes complete reports on
several EPUBs (the IDPF samples and our own). `ace-puppeteer` would need a browser installed
separately.
**Possible fixes**
- Make the Puppeteer runner an optional dependency. npm continues past an optional dependency
whose install fails, so the Electron runner would install on its own.
- Or document `PUPPETEER_SKIP_DOWNLOAD=1` in the README's install section for users of the
default `ace` command.
Contributor guide
Research direction
Start with bin/ace.js and trace the dependency chain for the default ace and ace-puppeteer commands. Review the README install section and package dependency declarations, then test a global install when the Puppeteer browser download fails; done means the Electron-based ace remains installed and works, while the documented workaround or optional runner behavior is clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100