-
Notifications
You must be signed in to change notification settings - Fork 1.2k
for brewed OSX cairo, fix "Package 'xcb-shm', required by 'cairo', not found" error #541
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
Conversation
This has worked for me, please consider merging |
I also needed to change this env var to make it work with my homebrew installation of cairo. +1 for merging this |
Same problem here. I can confirm that this patch fixes the problem. export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/X11/lib/pkgconfig" && npm install canvas --save |
there have been new releases since I made this patch... |
Ah yes, I think I needed to define that path as well when installing on Yosemite through brew. Would the build.sh script be called when doing 'npm install canvas'? Does npm invoke install script? |
From https://docs.npmjs.com/misc/scripts:
|
so, the idea is it that EDIT: or was it pkg-config that needed it ??? I can't remember now... export needed to happen in the script though |
Hm, shouldn't it be preinstall then? Sent from my iPad
|
if you define an install script, it actually replaces the install command (which npm runs for you). this is why it runs although, now that I think about it, I have no idea what the behaviour on windows would be. |
@kangax I think you’re right —
|
@mathiasbynens - I think when I tried that, the export didn't make it into node-gyp ... I could be wrong though. did you try it? |
With #574 merged I do not need this to make it work. I don't even have a This works without any errors: PKG_CONFIG_PATH="" npm install LinusU/node-canvas#include-paths |
@LinusU 👍 for yours 👏 |
@LinusU Your command doesn't seem to fix this particular issues still:
|
That said, I don't think this particular PR is correct either. Remember that a bash script won't run on Windows! |
@TooTallNate Hmm, that's strange. I'll have to dig deeper here. Do you have |
@TooTallNate yeah I realized that after I made the PR. will a normal npm preinstall script will work though? I'll be willing to update this PR @LinusU it does work for me though ... hmmm |
very strange: now, for me,
|
Could anyone please test this with the latest version, and if it doesn't work:
Thanks! |
No response in over a year so I'll go ahead and close this. If anyone still has this issue I would be happy to help debugging... |
No description provided.