-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Travis Build Error: libsass
bindings not found. Try reinstalling node-sass
?
#532
Comments
I'm using the latest version of gulp-sass which pulls in node-sass 2.0.0 beta, and I'm still experiencing this issue. |
@grayghostvisuals, add env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=true to your @StoneCypher, these are related issues. Some folks have not reported full logs and since the partial logs differ, hence the confusion. But rest assured most of the installation issues have commonalities. @goodforenergy, are you facing the issue locally or on CI server? If it is happening locally, please execute these commands one at a time: https://gist.github.com/am11/e5de3c49c219f0811e1d#comment-1386582. If it fails, please create a similar GH gist with the produced output and share the link. |
@am11 Here's my current Travis file https://github.com/grayghostvisuals/transformicons/blob/master/.travis.yml Do you think I still need to add that line you left above? |
@grayghostvisuals, apparently you are not getting the error described in this issue anymore. So no, you do not need to add that line. Node-sass' install script first try to download the binary and test it. If the binary is corrupted or incompatible with your system, it falls back to manual compilation of binary (given the required tools are available on the system, otherwise it will fail the build). It seems like it is downloading the correct version (v1.2.4) of node-sass binary which is compatible with OS run by TravisCI's VM. Though the current version of node-sass is v2.0.0-beta. |
@am11 - it is not happening locally. We use the frontend-maven-plugin to run a build task that downloads node and executes an npm install on the build machine, and operates out of a local node_modules folder for that project. The strange thing is that we have some projects doing the same thing on the same machine, and executing absolutely fine - but certain projects with no discernible differences in the setup will fail. Our CI server doesn't have node installed globally, but I tried doing that and running the commands in the gist you linked, and everything seemed fine. This is the output of a failed build, compared with one with no issues (a branch of the same project). I did just notice that the version of node we install using that build task is a little behind.. will try updating. Any advice is much appreciated. |
@goodforenergy, if this is happening intermittently on the same machine, it could be due to the network or timeout issue during node-sass being installed. I am not sure about the Momentarily, taking a closer look at the failure logs suggest that it throws at clean step: |
@am11 - thanks for the ideas. Thankfully / frustratingly, changing the node / npm version specified in I wonder though if you're right, and it's just a timing issue (and I've perhaps just been lucky with the last few builds). I had a look at the We can probably do without a clean there, but the following task is a build, which definitely requires I could try explicitly requiring |
@goodforenergy, see Heisenbug. 😃 |
@goodforenergy It's worth remembering that gulp dependencies are a directed graph, not a tree. There's nothing stopping those dependencies from redundantly depending on one another, provided no cycles are created. It's perfectly fine for Hope that helps |
FWIW: I just had the reported issue in a case where I installed Might not be related to the original issue, but this is the first match for this exact error message on google. Maybe it helps someone else. |
@apfelbox, starting with node-sass v2, node.js v0.12 and iojs v1.2 are supported. If you are running older version of node-sass and updated node.js to recently released v0.12 from v0.10, then you will face the issue. You can also explicitly specify the version when downloading the module; |
@am11 Thanks a lot, it actually worked. |
@am11 I am running 2.0.1. The precompiled binary was placed in var candidates = [
path.join(__dirname, '..', 'build', 'Debug', 'binding.node'),
path.join(__dirname, '..', 'build', 'Release', 'binding.node'),
path.join(__dirname, '..', 'vendor', process.sassBinaryName, 'binding.node')
]; which returns So my issue was just a simple mismatch in file paths. And that was easily solved by just running |
@apfelbox that is right. |
This solved it for me:
|
Thanks @StoneCypher. @am11 Yes, definitely a heisenbug, haha! Thanks for your suggestions, I'll keep them in mind if it crops up again. |
After upgrading the node node to 0.12.0, I met the same problem.
|
@apfelbox, run these commands: https://gist.github.com/am11/e5de3c49c219f0811e1d#comment-1386582 and make a similar gist with your output. |
@wangxiao same! |
@luozhihua Reinstall node 0.11.9 will work. |
@wangxiao Thanks, run this commands in the directory will work too: |
@luozhihua |
@luozhihua rebuild worked for me too, thx ! |
There is no need to email all these people with "this also worked for me." |
Maybe Github need a "like" feature. |
yeah, It will be convenient for us to find the right answer quickly and not disturb the most project watchers. |
@palimpsests, can you test with v3.0.0-pre? |
what the heck kind of error is this. it won't go away |
@xtianus79 Run this commands in the directory will work: |
what's odd about it is that I am using Visual studio to run my project's bower... and Npm packages... now when I rebuild in my CLI which is to the folder everything works... but then VS doesn't work. When I rebuild to VS then that works and now my CLI folder doesn't work when using git bash |
@xtianus79, make sure VS2015-preview and git bash are using same npm minor versions. |
@am11 do yo mean for the node-sass package? because they should be exactly the same as I put them in.... |
and the only reason why they are there is because VS build and places the npm packages in |
Sorry I mean node.js version, not npm. |
@am11 how can I find out what version of node.js version VS is using |
@xtianus79, I have no idea. I think you can find answer to such queries at http://stackoverflow.com/. Use the tag visual-studio-2015 and node.js. |
Thanks. And what is the nvm thing you were showing the other day. Would that fix things? Sent from my Windows Phone From: Adeel Mujahidmailto:notifications@github.com @xtianus79, I have no idea. I think you can find answer to such queries at http://stackoverflow.com/. Use the tag visual-studio-2015 and node.js. Reply to this email directly or view it on GitHub: |
nvmw, but you will still need to 'somehow' configure VS to use the preferred node.js version, instead the one which they shipped VS with.. |
thanks @am11 ... would you know how to do that by any chance? |
unsubscribing, even though i used to want to watch this bug |
@am11 they said it is 10.31 and they would write a blog post about it tomorrow. however their solution to fix it was not clear and it didn't seem to have any affect. it always seems like this stuff is baked in. |
@xtianus79, baked-in stuff is good. But it would be nice if they let you manage which version you want to use, and even which runtime; node.js and/or io.js (which is practically node.js on steroids!). |
@am11 agreed. However, it seems like they want to let you change it but it doesn't seem to actually work. Kind of the like the secret .gitignore file... which I figure the secret file was there because when i coped another one into the path it changed it to -copy... lol |
@am11 totally fixed my issue with your help and Mads blog post he released today... For anyone looking to have your path setup correctly to use PS - make sure ruby, and git, NPM, and Ruby are in your path... |
@luozhihua you're suggestion finally worked but the conflict was VS Vnext was using a baked in node 0.10.31 version and I have 0.12.0 installed on my path. |
@xtianus79, good to know and thanks for sharing the blog link. 👍 |
oh no you are going to make me look at another thing. lol... after my build. are you interested in getting my framework into omni aspnet generator??? |
FYI for those having this issue when using VS2015, you have to install the same version of node which VS is using (0.10.31 32bit currently: https://nodejs.org/dist/v0.10.31/node-v0.10.31-x86.msi). More info here: http://stackoverflow.com/questions/31301582/task-runner-explorer-cant-load-tasks/31304060#31304060 |
@JoshMcCullough, thanks for the info! But isn't it so that @madskristensen's blog post pointed out by @xtianus79 (http://blogs.msdn.com/b/webdev/archive/2015/03/19/customize-external-web-tools-in-visual-studio-2015.aspx) explains how user can change the default node.js (-like) runtimes (node.js/io.js/atom-shell etc.)? Which means you can install a latest (or your favourite) version of node.js or io.js and point VS2015 to use it for task-runner. |
You should have your node engine and your node-sass binding compiled against the same C++ runtime library. You can use VS's built-in node or tell VS to use another engine, does not matter. Just use the same for all binary modules. |
Cool, I'd LOVE to use the non-built-in version of node, and will check that link! Thanks. |
This worked great, thanks @am11! |
Is any of this worth adding to the troubleshooting guide?
|
Implicitly yes. Swell Story: Given Sass editor (OOTB) support was first added in VS2013 (Update 3? or 2?), and mostly people who were using Sass with VS2013 had Web Essentials 2013 extension installed. WE2013 packs node.exe with CSS/JS superset compiler packages including node-sass and hence distill the version of node-sass binary (binding.dll->binding.node). With that said, it may confuse the user of VS2013, who upgraded to VS2015, if they install node-sass with system-installed node.exe or copy from other machine and then expect it to run via task runner (like for example they can do with coffeescript or less packages). Since (as we know and some users may not.. that) node-sass is based on native (C++) binary and the binary downloaded at install-time is specific to that version of node.exe, OS bitness/arch etc., it is not as "portable" as other npm packages. So a short version of this story would probably save us from explaining it over and again. 😉 |
I look forward to your pull request @am11 :D
|
Can someone please save my skull from being pounded firmly against the wall and tell me how I can find a fix? This is the output from Travis http://www.codeshare.io/Z2vdz Using gulp-sass 1.2.2. Here is my travis file as well. Thanks y'all
The text was updated successfully, but these errors were encountered: