-
Notifications
You must be signed in to change notification settings - Fork 271
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
[GUIDE/FIX] installing on M1 (Apple Silicon) Macs: npm ERR! sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8 #204
Comments
Thanks for the guide. I'm closing as this should now be fine since sharp |
I'm still having issues getting things to run on my M1. Wonder if you can help me out? Existing projects fail, but even a brand new one does when I add @nuxt/image. always on building Sharp. When I install vips using brew I'm getting I'm running all things under arm, so no rosetta. latests versions. The only diff I see with yours is that for some reason npm still wants to run python 2.7, despite having 3.9 and all things set to point to that. And a diff node version:
Any idea what I'm missing? I feel like I'm running in circles 😖 |
Hi @Gompje. Sorry hearing inconveniences. Have you tried node-gyp insulation: https://github.com/nodejs/node-gyp#on-macos |
// sorry for the long reply, I wrote this during my tests hi @pi0, I followed the guide. There was indeed an error somehow with my xcode tools when running the acid test. That's resolved now :) sadly the errors still remain.
When I run this code in a Ubuntu x86 vm on unraid, everything works as expected. (just to be sure!) I noticed that I do run more recent versions of big sur, xcode, node, python and other packages AND that my npm found Python version seems to be stuck on stock 2.7. (which is honestly driving me crazy). Could it be all just the python config mess that is causing this? // its not → when I add the any ideas? can the version of sharp be bumped to ^.0.28? in if I do When I add can I force ipx to use v0.28? Any plans for a bump? For now I guess I can manually bump the version in its package.json locally and see how that goes. it doesn't matter if it does not run perfectly locally (for now), it just has to run. |
@Gompje Dependencies updated in [email protected]. It would be probably better if you also recreate lock file and |
@pi0 finally have some time to test. this is a log.
hmm seems like it's still stuck on v0.27? back to cleaning it is, and changing package.json manually. no go. BUT For now it does seems to run fine on an empty project. Either way I will give feedback when I finished/or get stuck rebuilding. Let's hope it was just old conflicting packages/code that prevented a decent upgrade. |
Update: seems to work 😄 But it works! 🎉 // with npm. it seems to be that it was old node-sass that blocked it, and several eslint version mismatches b/c of to many packages that where upgraded. |
install the latest version of node using |
According to #204 (comment) and https://www.powerlifting.stream/posts/gatsby-m1/, I solved it by installing vips using homebrew:
|
For the record, If you're trying to {
/* Other configs */
"resolutions": {
"sharp": "^0.29.0"
}
} |
Still worked for me for an old npm package, nice work! |
…). Add missing .gitignore Closes #11
i've got a similar problem to this, while at this point vips has come out with arm mac support as of v8.10.6, one of my things is trying to |
Just a small note on this issue. With an M1, using
and latest versions of |
i was able to fix it by adding |
My error code was slightly different since it included:
Adding a symlink so the compile script could locate
More info here: https://stackoverflow.com/questions/71468590/env-python-no-such-file-or-directory-when-building-app-with-xcode |
When I run the command
Searching this error only results in Ruby-related questions (which makes sense, I guess), but I'm not sure what I should do as someone installing the package. The closest answer I got was https://github.com/orgs/Homebrew/discussions/4404 |
The official docs shall be updated as it says on M1 |
Thanks! Adding a resolution for sharp works perfectly for me. |
I don't have enough words to thank you. <3 |
now i get a new error |
i think i love you |
Hello there,
first of all, thank you all for the contributions to this plugin.
But I can't install it on a M1 (Apple Silicon Mac), since one of the Dependencies has to be built manually to make this work.
The Problem
When executing
npm install --save-dev @nuxt/image
I get the following error stack:
and the package is not being installed.
Solution
Install gcc
The "libvps" depends on gcc, so do:
Install XCode Build Tools CLI
Also required by "libvps"
Install "vips"
Finally 🥳, install @nuxt/image
(or use yarn, if you want)
This solution works for me, but I am not an expert in all these dependencies, so if there is anything wrong, please correct it. I would suggest leaving this Issue open until e.g. the dependency get's updated and supports M1 Macs out of the box, so that anyone having the same problem can search and find this issue.
The text was updated successfully, but these errors were encountered: