-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Mismatched x64 and ARM64 architectures on M1 Mac #2588
Comments
What's the output of See also #2460 (comment) |
Yeah I did see #2460 however it's weird because it was working all fine for me for several hours. I guess I'll try some other suggestions in that thread. |
Logs from running
|
vips is arm64 but you're using x64 Node.js - the architectures must match. |
That's weird. My node 15.9.0 is returning x64, is it suppose to return
|
If you're using x64 Node.js on an ARM64 CPU then homebrew-installed ARM64 libraries will not work with it. Use Alternatively use ARM64 Node.js. |
That's so weird, I don't know how I ended up in this state. 😕 I thought I had been using the
and now Thanks for your advice. |
Maybe if I can leave a suggestion for the installation guide https://sharp.pixelplumbing.com/install#apple-m1 is that people should verify what architecture is their node running in with |
Glad you worked it out. There's a discussion later in #2460 (comment) about the mismatched architecture problem - definitely keen to make this easier. What's the output of running |
It looks like |
Here's some outputs for debugging
I think the most confusing part was that even though node 15 supports arm64 natively, the default package install still runs in x64 mode. |
See #2460 (comment) |
Perfect thank you. |
Worked! Thanks |
i use node ver 14 and resolve with sharp: "^0.29.3" |
For anyone else running into this, please upgrade to the latest version of sharp and this should all "just work" e.g. it will now ignore a Homebrew-installed |
I had installed
sharp 0.27.1
earlier today on my M1 Mac and used it without problems for several hours, resizing and converting various images.Then a few hours ago I was changing some yarn packages and
sharp
stopped working all of a sudden, and I was getting this message whenever I ran a node script withrequire("sharp")
I've tried various troubleshooting steps without any effect
brew reinstall vips
sharp
withyarn add --force sharp
yarn cache clear
node_modules
and reinstalling packages withyarn install
My env
I'm completely dumbfounded why it was working well then suddenly stopped working.
The text was updated successfully, but these errors were encountered: