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

Add warning if sharp bindings aren't built correctly #1638

Merged
merged 2 commits into from
Apr 2, 2019
Merged

Add warning if sharp bindings aren't built correctly #1638

merged 2 commits into from
Apr 2, 2019

Conversation

sidharthachatterjee
Copy link
Contributor

Added a friendly error message in case the require to the bindings throws for any reason. The error message looks like this:

"sharp" does not seem to have been built or installed correctly.

- Try to reinstall packages and look for errors during installation
- Consult "sharp" installation page at http://sharp.pixelplumbing.com/en/stable/install/

If neither of the above work, please open an issue in https://github.com/lovell/sharp/issues

Fixes #1624

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 98.282% when pulling 7de714c on sidharthachatterjee:master into 0a3512d on lovell:master.

@sidharthachatterjee
Copy link
Contributor Author

Tests passed but it seems like the Travis job on Linux (musl) - Node 8 failed with

Segmentation fault (core dumped)
npm ERR! Test failed.  See above for more details.
The command "sudo docker exec sharp sh -c "npm test"" exited with 1.

@lovell lovell merged commit 2e0fbbb into lovell:master Apr 2, 2019
@lovell
Copy link
Owner

lovell commented Apr 2, 2019

Thanks Sidhartha, this is a great improvement.

@lovell lovell added this to the v0.22.1 milestone Apr 2, 2019
lovell added a commit that referenced this pull request Apr 2, 2019
Remove bindings dependency as this isn't really... required
@lovell
Copy link
Owner

lovell commented Apr 2, 2019

I've added some more specific help in commit 687795c based on common error messages. Further additions/improvements are always welcome.

(I've also added commit 90a0382 to hopefully prevent/reduce the occurrence of the unrelated test failure you experienced.)

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.

3 participants