Apple Silicon - Node - ARM64/AARCH64
thomas-obernberger opened this issue ยท 20 comments
Hi @wilsonzlin. I am currently working on a Mac based on the silicon platform.
When I try to run this module with node I experience the following exception:
Error: Cannot find module '@minify-html/node-darwin-arm64'
Dependency in the package.json: "@minify-html/node": "0.15.0",
As I understood: There is a module for darwin-aarch64 that should also work with arm64. When I try to load and use this module (darwin-aarch64) manually, I get an error that aarch64!=arm64 from npm while installing it.
Please help me. :)
Thanks,
Thomas
Same error here
Thanks for raising, this should be fixed in the next version. As you have noticed, the correct value should be arm64
, not aarch64
.
Once the next version is out, let me know if it works on your end.
Same problem for me.
Any plans when you'll plan to publish the next version? :)
Confirmed this is an issue.
Same issue here. @wilsonzlin when are you planning to release the new version?
Theres no @minify-html/node-darwin-arm64
in NPM
https://www.npmjs.com/package/@minify-html/node-darwin-arm64
So, It's impossible to install in any Mac M Series
As a temporary solution, you can use @minify-html/wasm
. Don't forget to add the --experimental-wasm-modules
flag.
@wilsonzlin Can you release it?
++
same issue
I have the same problem, but with '@minify-html/node-linux-arm64'.
@wilsonzlin please please please release
nevermind! I stopped using minify-html because there's no point in using rust, your support is terrible, and the codebase itself is a mess. have a great day
When's the fix?
As a temporary workaround, 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)
As a temporary workaround, add the following to your package.json:
"@minify-html/node-darwin-arm64": "npm:@minify-html/node-darwin-aarch64@^0.15.0",
The temporary workaround doesn't work:
npm error code EBADPLATFORM
npm error notsup Unsupported platform for @minify-html/node-darwin-aarch64@0.15.0: wanted {"os":"darwin","cpu":"aarch64"} (current: {"os":"darwin","cpu":"arm64"})
npm error notsup Valid os: darwin
npm error notsup Actual os: darwin
npm error notsup Valid cpu: aarch64
npm error notsup Actual cpu: arm64
npm error A complete log of this run can be found in: /.../2024-08-28T20_14_32_898Z-debug-0.log
Also, this workaround would be a nightmare to manage because:
- One must remember about it and remove it if/when a proper fix is provided.
- Having to deploy to production (or at least to staging or testing), explicitly adding an arm-specific package would break deployments.
Finally, the previously mentioned workaround of using the wasm version also failed on me, even when running node with the flag.
It was something about CJS, but I didn't pay much attention to the exact error. It might be because I'm running a NestJS app, and TypeScript and transpiling are involved.
@wilsonzlin, is there a work in progress or, even better, any ETA for the fix?
I can't find any PR or branch related to this issue, even though it affects many people.