Closed jspizziri closed 7 months ago
well spotted, thank you very much for letting us know. ironically, the offending npm package is deleted because of build-time errors, it is not problematic at runtime. instead of moving rimraf to devdeps, I am wondering whether we could just capture a non-zero exit code and fallback gracefully to a co-op (e.g. || echo noop)
ps: ultimately, the better fix would be to remove this postinstall workaround, and instead swap the antiquated ava dependency for vitest or another modern test runner {I believe types/glob is a transitive dep via ava)
BTW, this also causes installing with pnpm
to fail, and as a result makes using this library extremely inconvenient in many situations where network is an issue, due to npm
being fundamentally broken...
Sorry this took so long to fix. Hopefully this works:
https://github.com/readium/r2-shared-js/commit/57549fd198ddb2d00ae2437947c3b8cdfa24471c
Thanks @danielweck , pnpm
is now able to install the package just fine!
This commit introduced a
postinstall
command. That command depends onrimraf
which is listed as adevDependency
. This causes an install failure when attempting to install this package without thedevDependencies
which would be traditional in a production build.