Skip to content

[Bug] Build error with sharp on workspaces #2112

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

Closed
Excaa opened this issue Nov 10, 2020 · 5 comments
Closed

[Bug] Build error with sharp on workspaces #2112

Excaa opened this issue Nov 10, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@Excaa
Copy link

Excaa commented Nov 10, 2020

I have a project with dependency to sharp 0.26.1 through another dependency. When I try to install the project it fails with sharp@npm:0.26.1 must be built because it never did before or the last one failed. Checking the build errors the error is fatal error C1083: Cannot open include file: 'vips/intl.h': No such file or directory. Same build works with yarn1 and npm. The possible fixes listed on sharps github issues didnt help.

Installing sharp on yarn1 and then copying the build to node_modules/sharp manually makes everything work also.

Minimal project to reproduce the issue can be found here: https://drive.google.com/file/d/1sjHMp_xtoH4BCd3_P3k_9DjtgKUI9RZC/view?usp=sharing

Taking the test package out of workspace structure and running 'yarn' (yarn1) or 'npm i' works without a problem.

Environment if relevant (please complete the following information):

  • OS: linux, windows, osx
  • Node version 14.15.0, 12.18.3, 12.18.2
  • Yarn version 2.3.3, example package has specific commit but error appears on both

If this sounds more like a problem on the sharp side, please let me know and I'll ask there.

@Excaa Excaa added the bug Something isn't working label Nov 10, 2020
@jounii
Copy link

jounii commented Nov 10, 2020

Thanks for reporting this one. I have tried to debug this with @Excaa and just side note the .yarn/releases has specific berry build we're using right now, it's the 2.3.3 with patch to the fsevents install (#2078 (comment)). I was not able to use jest without the fix.

@arcanis
Copy link
Member

arcanis commented Nov 10, 2020

Building sharp 0.26.1 here fails with vips/vips8: No such file or directory (different error than yours), but works with 0.26.2.

@jounii
Copy link

jounii commented Nov 10, 2020

So it seems to work with that version bump, at least with my macOS. @Excaa can test the Windows too.

@jounii
Copy link

jounii commented Nov 10, 2020

Okay, it's probably fixed in this, which adds workaround for yarn2 difference with exporting environment variables lovell/sharp#2379

@arcanis
Copy link
Member

arcanis commented Nov 10, 2020

Good to hear 👍

@arcanis arcanis closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants