Open StreamSurfer opened 6 months ago
Hey there,
I encountered the same error while trying to deploy to Vercel using yarn. It looks like the package @minify-html/node-darwin-arm64@0.15.0, required by @minify-html/node@^0.15.0, isn't available on the npm registry for the x86_64-apple-darwin architecture.
I initially faced this issue too but later realized it was because astro-min doesn't work well with SSR (Server-Side Rendering) or hybrid outputs in Astro, especially when deploying with Vercel. Since I'm using pnpm and a Turbo repo, I had to double-check my Astro configuration. Make sure you have prerender: true set in your Astro components or that your project's build output is set to static. Adjusting these settings helped resolve the deployment issue on Vercel in my case.
I have the same problem, I have configured my Astro project in "static" mode, I'm using bun as package manger and Windows as OS (in case it influences something).
here's the error message in case it's helpful
Command failed with exit code 1: bun add astro-min@^1.2.6
bun add v1.1.3 (2615dc74)
Resolving dependencies
error: package "@minify-html/node-linux-arm64" not found registry.npmjs.org/@minify-html%2fnode-linux-arm64 404
error: package "@minify-html/node-darwin-arm64" not found registry.npmjs.org/@minify-html%2fnode-darwin-arm64 404
Resolved, downloaded and extracted [19]
error: @minify-html/node-darwin-arm64@0.15.0 failed to resolve
error: @minify-html/node-linux-arm64@0.15.0 failed to resolve
Astro could not update your astro.config.js file safely.
Reason: Unable to install dependencies
It's working again, with v1.3.1
😎
The arm64 versions are somehow not available on npm registry, but just bun seems to request all optional packages. So right now it only won't build, if you actually have an apple arm device. I couldn't get a macos runner to build them, at least not yet.. and there will be some more improvement soon 😃
@shawnvanderveer I also noticed that, strange pnpm behaves diffrent on local machine and on vercel..
There is no @minify-html/node-darwin-arm64 package on npm. The package was mistakenly published as @minify-html/node-darwin-aarch64. (https://github.com/wilsonzlin/minify-html/issues/172)
However, the corrected version has not yet been released.
As a temporary workaround for arm64 macOS, add the following to your package.json.
"@minify-html/node-darwin-arm64": "npm:@minify-html/node-darwin-aarch64@^0.15.0",
then pnpm install
(I use pnpm)
I'm getting the following error when trying to install the package using yarn.
error Couldn't find package "@minify-html/node-darwin-arm64@0.15.0" required by "@minify-html/node@^0.15.0" on the "npm" registry
I'm using x86_64-apple-darwin. I tried using export TARGET=x86_64-apple-darwin but no luck. Thank you.