-
Notifications
You must be signed in to change notification settings - Fork 394
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
Mention libvips/sharp gotcha in setup instructions #2932
Conversation
Link to the changed page on the preview environment: https://dvc-org-clarify-build-i-leauh2.herokuapp.com/doc/user-guide/contributing/docs#development-environment |
Great catch! I've run into this before as well, it's related to us using old Gatsby packages that have been left behind by more recent versions of libvips. I'd suggest a minor change to the text that makes it read better to me:
Someone on the docs team might have a different/better suggestion. Other than that, thanks for the contribution! |
fb145c2
to
2caea4c
Compare
Thanks for the suggestion @rogermparent! Indeed reads better to me. I've updated the PR :) |
I think it might be better to have a Troubleshooting section header and put this in a bullet list. WDYT @jorgeorpinel ? |
So maybe we should make an issue to update Gatsby paks instead @rogermparent ? It's great to be aware of this but documenting it means we don't have a solution.
@iesahin I think Troubleshooting should be about the products, not about the docs engine. |
> formats? You may be running into | ||
> [this issue](https://github.com/gatsbyjs/gatsby/issues/20698). You can fix it | ||
> by reinstalling `node_modules` with a flag that forces `sharp` to ignore your | ||
> globally installed `libvips`: | ||
> | ||
> ```dvc | ||
> $ rm -r node_modules | ||
> $ SHARP_IGNORE_GLOBAL_LIBVIPS=true yarn | ||
> ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we must have this, let's keep it very very short 🙂
> formats? You may be running into | |
> [this issue](https://github.com/gatsbyjs/gatsby/issues/20698). You can fix it | |
> by reinstalling `node_modules` with a flag that forces `sharp` to ignore your | |
> globally installed `libvips`: | |
> | |
> ```dvc | |
> $ rm -r node_modules | |
> $ SHARP_IGNORE_GLOBAL_LIBVIPS=true yarn | |
> ``` | |
> formats? You may be running into | |
> [this issue](https://github.com/gatsbyjs/gatsby/issues/20698#issuecomment-576353427). |
☝️ direct link to the solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact I'd move this note after the paragraph below.
Hmmmm. There's a strange link checker error too: https://github.com/iterative/dvc.org/pull/2932/checks?check_run_id=3958726103. Do you think that's coming from |
#2851 (merged shortly after this issue was made) actually did upgrade these packages, so I believe we shouldn't run into this anymore.
I'm not sure where it's coming from, usually this happens on massive diffs- it seems the action is having trouble finding merge bases so it's working off of the plain diff from |
Tried again from scratch on ad40ef3 and this is indeed no longer an issue 😄 |
Great to hear that it works now! I'm trying to get a replication of the link-check bug, but can't get one from a new branch even if I clone this one- reopening to hopefully get to the bottom of this. |
Alright, managed to replicate and solve the issue here. It was indeed |
Thanks again for the report @duijf and for looking into this @rogermparent 👍 |
In order to document some stuff about Studio, I wanted to set up
dvc.org
for local development. I ran into this gotcha, and wanted to mention it in the setup instructions to save others some time.Gatsby has a dependency on the native
libvips
library via thesharp
NPM package. Sharp by default uses the systemlibvips
if it's available, but that can lead to compatibility problems if there is a version mismatch (or build options are different).On my system I have
libvips
installed for something else. This led to the following error when runningyarn develop
:The fix is to make
sharp
ignore the systemlibvips
. This needs to be done at dependency install time, as documented in this Gatsby issue: gatsbyjs/gatsby#20698After removing
node_modules
and runningyarn
with this env var, the problem went away.