-
Notifications
You must be signed in to change notification settings - Fork 22
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
npm i node-gd and error #91
Comments
Hi,
Cheers Vincent |
Thanks for response. After I fix Xcode now I found this error:
|
no luck with this issue 😭
I try for new install brew and npm but it's not working. These are my reproduction steps:
|
try to run this:
|
may be this issue found only in arm64 |
You're correct, this is an ARM only issue and I've been having it for a while now. It does not compile on neither mac M1 nor M2. |
I managed to make it work on my Macbook M2. There are two problems: 1 - node-gd requires an older version of Python, so you need to install Python 2.7.18 from https://www.python.org/downloads/release/python-2718/ 2 - node-gyp is cannot locate the gd files (gd.h, gd_io.h and so on) on the directories So I decided to simply copy the required files to
I'm sure there must be a more elegant way to solve this, but at least I'm no longer stuck with this issue. |
I found the solution. You must set the environment variable CPLUS_INCLUDE_PATH=/opt/homebrew/include Reference: Automattic/node-canvas#1733 |
I ended up forking the project with a fix so I don't have to keep fixing it every time, you can find it here: https://github.com/vitorbertolucci/node-gd It's also published on npm at https://www.npmjs.com/package/@vitorbertolucci/node-gd |
Thanks. However I think I will stick with the original ^^ |
Just release v3.0.0 that might fix the M1 and M2 issues. |
For now I'd like to close this ticket, if one has any findings with regard to M1 and/or M2, please open a new ticket so I can take a look. Thanks in advance. |
When I do npm i node-gd I found this error:
How can I fix this issue? I already install brew install pkg-config gd
System Version: macOS 12.4 (21F79)
Macbook pro M1
The text was updated successfully, but these errors were encountered: