Skip to content
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

Update the instruction on mirror settings #2602

Closed
wants to merge 1 commit into from

Conversation

nevill
Copy link

@nevill nevill commented Mar 2, 2021

According to the source, using npm_config_sharp_libvips_binary_host is enough to install the binary from mirror host.
In fact, it doesn't work if sharp_binary_host is set to "https://npm.taobao.org/mirrors/sharp" (should be "https://npm.taobao.org/mirrors/sharp-libvips/v8.10.0/").

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 8e1f2d6 on nevill:develop into 68ccba8 on lovell:master.

@lovell
Copy link
Owner

lovell commented Mar 2, 2021

Hi, there are potentially two binaries downloaded at install time, one for sharp and one for libvips.

https://sharp.pixelplumbing.com/install#chinese-mirror

Alibaba provide a mirror site based in China containing binaries for both sharp and libvips.

The change in this PR removes use of the mirror for the sharp binary. Is this intentional?

@lovell
Copy link
Owner

lovell commented Mar 2, 2021

I've just tested the documented approach and it works for me. Please ensure you're using the latest version.

@nevill
Copy link
Author

nevill commented Mar 3, 2021

Oh well, I see.
I was thinking the problem here is the false document.

Because config variable npm_config_sharp_binary_host is not used at all according to the source (the latest).

const distBaseUrl = process.env.npm_config_sharp_dist_base_url || process.env.SHARP_DIST_BASE_URL || `${distHost}/v${minimumLibvipsVersionLabelled}/`;

Hi, there are potentially two binaries downloaded at install time, one for sharp and one for libvips.

Then, I realized that another binary is downloaded via package prebuild-install. So, npm_config_sharp_binary_host is considered. 😃

@nevill nevill closed this Mar 3, 2021
@nevill nevill deleted the develop branch March 3, 2021 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants