minify-html icon indicating copy to clipboard operation
minify-html copied to clipboard

Apple Silicon - Node - ARM64/AARCH64

Open thomas-obernberger opened this issue 1 year ago • 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

thomas-obernberger avatar Jan 10 '24 13:01 thomas-obernberger

Same error here

gustavo-nakabayashi avatar Jan 15 '24 22:01 gustavo-nakabayashi

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.

wilsonzlin avatar Jan 17 '24 04:01 wilsonzlin

Same problem for me.

Any plans when you'll plan to publish the next version? :)

mariohamann avatar Jan 28 '24 16:01 mariohamann

Confirmed this is an issue.

JssDWt avatar Feb 12 '24 18:02 JssDWt

Same issue here. @wilsonzlin when are you planning to release the new version?

fstovarr avatar Feb 16 '24 11:02 fstovarr

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

vinicius73 avatar Mar 08 '24 17:03 vinicius73

As a temporary solution, you can use @minify-html/wasm. Don't forget to add the --experimental-wasm-modules flag.

demensky avatar Mar 08 '24 17:03 demensky

@wilsonzlin Can you release it?

kireerik avatar Mar 08 '24 23:03 kireerik

++

brianjd avatar Mar 14 '24 12:03 brianjd

same issue

g-mero avatar Apr 04 '24 09:04 g-mero

I have the same problem, but with '@minify-html/node-linux-arm64'. @wilsonzlin please please please release

443pablo avatar Apr 07 '24 04:04 443pablo

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

443pablo avatar Apr 12 '24 23:04 443pablo

When's the fix?

guixinchn avatar Apr 24 '24 12:04 guixinchn

image

iodn avatar May 03 '24 20:05 iodn

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)

maxchang3 avatar Aug 20 '24 19:08 maxchang3

@maxchang3

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/[email protected]: 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.

andreasciamanna avatar Aug 28 '24 20:08 andreasciamanna

Another side effect : Install the package with yarn (under Windows/Linux) doesn't work : yarn add @minify-html/node ➤ YN0035: │ @minify-html/node-darwin-arm64@npm:0.15.0: Package not found ➤ YN0035: │ Response Code: 404 (Not Found) ➤ YN0035: │ Request Method: GET ➤ YN0035: │ Request URL: https://registry.yarnpkg.com/@minify-html%2fnode-darwin-arm64 ➤ YN0000: └ Completed in 0s 955ms

marcgardent avatar Sep 09 '24 13:09 marcgardent