rabbit_rabbit
rabbit_rabbit3d ago

postinstall failing for rollup

Upgrading to fresh 2 and running in a Docker container the postinstall script for rollup (a dependency of vite) is failing. For what it's worth, this appears to work just in my mac, but is failing docker & github actions builds. Thanks!
13.71 Download https://registry.npmjs.org/@rollup%2frollup-darwin-arm64
13.81 Download https://registry.npmjs.org/@rollup%2frollup-linux-arm-gnueabihf
13.96 Download https://registry.npmjs.org/@rollup%2frollup-linux-riscv64-musl
14.07 Initialize rollup@4.53.0: running 'postinstall' script
14.07 error: script 'postinstall' in 'rollup@4.53.0' failed with exit code 127
14.07 stderr:
14.07 patch-package: command not found
14.07
14.11 error: failed to run scripts for packages: rollup@4.53.0
------
Dockerfile:6
--------------------
4 | COPY deno.json deno.lock ./
5 |
6 | >>> RUN deno install --frozen --allow-scripts
13.71 Download https://registry.npmjs.org/@rollup%2frollup-darwin-arm64
13.81 Download https://registry.npmjs.org/@rollup%2frollup-linux-arm-gnueabihf
13.96 Download https://registry.npmjs.org/@rollup%2frollup-linux-riscv64-musl
14.07 Initialize rollup@4.53.0: running 'postinstall' script
14.07 error: script 'postinstall' in 'rollup@4.53.0' failed with exit code 127
14.07 stderr:
14.07 patch-package: command not found
14.07
14.11 error: failed to run scripts for packages: rollup@4.53.0
------
Dockerfile:6
--------------------
4 | COPY deno.json deno.lock ./
5 |
6 | >>> RUN deno install --frozen --allow-scripts
1 Reply
rabbit_rabbit
rabbit_rabbitOP3d ago
As a workaround I added "patch-package": "npm:patch-package@latest" to my own project's dependencies, which resolved the issue.

Did you find this page helpful?