Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use in MacOS arm64 #63

Open
daoanhthanh opened this issue Nov 22, 2023 · 5 comments
Open

Cannot use in MacOS arm64 #63

daoanhthanh opened this issue Nov 22, 2023 · 5 comments

Comments

@daoanhthanh
Copy link

I installed, imported and used like you specified in document. But when I run I got this error:

$> node index.js
node:internal/modules/cjs/loader:1048
  const err = new Error(message);
              ^

Error: Cannot find module '/Users/thanh_da/Documents/im_nodejs/node_modules/magickwand.js/lib/binding/darwin-arm64/magickwand.node'
Require stack:
- /Users/thanh_da/Documents/im_nodejs/node_modules/magickwand.js/lib/index.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/Users/thanh_da/Documents/im_nodejs/node_modules/magickwand.js/lib/index.cjs:21:13)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at cjsLoader (node:internal/modules/esm/translators:284:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/thanh_da/Documents/im_nodejs/node_modules/magickwand.js/lib/index.cjs'
  ]
}

Node.js v20.9.0

This is the only code that use the lib

import { Magick } from "magickwand.js";

const resize = async (imageArrayBuffer, specification) => {
	const wizard = new Magick.Blob(imageArrayBuffer);
	console.log("Before transfrom", wizard.length);
	const im = new Magick.Image();
	await im.readAsync(wizard);
	return await im.resize(specification).then(() => wizard.data);
};

Can someone please explain to me, is this a library error or did I do something wrong?

This is my package.json

{
  "name": "lambda-image",
  "version": "1.0.0",
  "private": true,
  "type": "module",
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@aws-sdk/client-s3": "^3.454.0",
    "axios": "^1.6.2",
    "file-type": "^18.7.0",
    "magickwand.js": "^1.0.0-beta.6"
  }
}
@mmomtchev
Copy link
Owner

As you may have seen from my profile, I am currently unemployed because of an extortion involving the French judicial system. Some of the people involved in the extortion are trying to make me shut up and they are throwing a promise for a mac arm64 into the mix. Does your posting of this issue have anything to do with this extortion?

@daoanhthanh
Copy link
Author

daoanhthanh commented Nov 22, 2023

As you may have seen from my profile, I am currently unemployed because of an extortion involving the French judicial system. Some of the people involved in the extortion are trying to make me shut up and they are throwing a promise for a mac arm64 into the mix. Does your posting of this issue have anything to do with this extortion?

@mmomtchev No, please. I'm just a normal user who finds your project interesting. I'm not from your country and know nothing about your situation. How terrible it is for a person to be caught in that situation. I considered donating to you, but the minimum amount is 2/3 of my monthly income, so I can't now donate to you.

@daoanhthanh
Copy link
Author

@mmomtchev I know that with the current situation, it is difficult for you to continue the great unfinished work. However, if at any moment you suddenly come up with an idea for the cause of the error I mentioned above, I would appreciate it if you could share it here.

@mmomtchev
Copy link
Owner

mmomtchev commented Nov 22, 2023

Let me summarize for you: you just bought your Mac and this was the very first opensource project that you installed on it, and by some chance you happened to be one of the two persons who downloaded the still unannounced new version and it happened to be the very project where people were asking for an arm64 version in connection with an extortion with the French Police and Judiciary?

Man, if I was you, I was going to buy a lottery ticket. You know, sometimes, karma works this way.

But then again, do not worry too much about me. I believe in Game Theory of which Life is the Ultimate Manifestation, and I am absolutely convinced that at the end, things might turn up differently. Maybe all those people who asked for an arm64 (all except you of course) will turn up to be good and honest people who were terribly misled and the person who misled them will simply pay me 3x my last salary over this period in order to avoid any further misunderstanding.

@Vovcharaa
Copy link

Hello @mmomtchev
GitHub added support for free Apple Silicon runners for GitHub Actions actions/runner-images#9254
Could you consider providing prebuilt darwin-arm64 packages now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants