Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Provide a useful error message when the binding is not found #1148

Merged
merged 1 commit into from
Sep 16, 2015

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Sep 16, 2015

Currently we show the unhelpful for libsass binding not found.
This accounts for a number of reoccurring GitHub issues.
It's also the second largest driver of Google traffic to the node-sass GitHub repo.

Before

Error: `libsass` bindings not found in /Users/michael/Projects/Sass/node-sass/vendor/darwin-x64-45/binding.node. Try reinstalling `node-sass`?

After

Error: The `libsass` binding was found in /Users/michael/Projects/Sass/node-sass/vendor/darwin-x64-45/binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version.

@xzyfer
Copy link
Contributor Author

xzyfer commented Sep 16, 2015

FTR running npm rebuild node-sass tries to download the binary first if possible

$ npm rebuild node-sass

> [email protected] install /Users/michael/tmp/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /Users/michael/tmp/node_modules/node-sass/vendor/darwin-x64-45/binding.node

> [email protected] postinstall /Users/michael/tmp/node_modules/node-sass
> node scripts/build.js

` /Users/michael/tmp/node_modules/node-sass/vendor/darwin-x64-45/binding.node ` exists.
 testing binary.
Binary is fine; exiting.
[email protected] /Users/michael/tmp/node_modules/node-sass

Currently we show the unhelpful for `libsass` binding not found.
This accounts for a number of reoccurring GitHub issues.
It's also the second largest driver of Google traffic to the
node-sass GitHub repo.
xzyfer added a commit that referenced this pull request Sep 16, 2015
Provide a useful error message when the binding is not found
@xzyfer xzyfer merged commit 17cfde3 into sass:master Sep 16, 2015
@xzyfer xzyfer deleted the feat/better-binding-error branch September 16, 2015 13:32
@xzyfer xzyfer mentioned this pull request Sep 16, 2015
@xzyfer xzyfer modified the milestones: next.patch, v3.3.3 Sep 17, 2015
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this pull request Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant