"libsass bindings not found. Try reinstalling node-sass" - node.js

So today I was trying to install MeepBot for StreamMe, and I ran into the error that says: "'libsass' bindings not found. Try reinstalling 'node-sass'." I reinstalled it like a million times. I have tried: "npm un/install --save-dev node-sass," "npm rebuild node-sass," etc. Can someone please give me an answer to my problem?
Picture: http://prntscr.com/axbxu8
P.S. keep in mind, I am using CentOS 6.

According to node-sass project's README.md only binaries for "popular platforms"(i.e. Windows/Mac) are included and you may need to build for other platforms like CentOS.
Here are roughly the steps (reading the readme would give you a better idea):
- cd to the node-sass directory within your project source.
- node scripts/install.js
- node scripts/build.js
Should see a message like Binary is fine; exiting.
Try to run npm rebuild node-sass again and it should work!

have you tried reinstalling everything? rm -rf node_modules; npm i. i've had to do that multiple times before.
otherwise, npm rebuild node-sass should work unless there are multiple versions of node-sass in your dependency tree - then maybe not. are you using npm v3+?

I would suggest try upgrading your gcc compiler as node-sass uses gcc to compile. And then try this -
npm rebuild node-sass
If that doesn't work then try runing this code (you must be using node version 4 or above).
npm install -g n
rm -R node_modules/
npm uninstall --save-dev node-sass
npm install --save-dev node-sass#2
npm install
npm -g install node-gyp#3
npm rebuild node-sass
If you are using multiple version of node then you will have to run npm rebuild node-sass every time you change node version.
You can also use gulp-sass npm install gulp-sass#2 if you want.

I was facing this issue. In my case the parent package.json was referring to new version of node-sass but the version of gulp-sass was referring to old node-sass. As soon as I updated gulp-sass to latest version, and ran 'npm rebuild node-sass', issue was gone.

Related

gulp 4.0.0 shows npm outdated

I am running the latest available Gulp.js 4.0.0 and yet somehow npm says this:
> npm outdated
Package Current Wanted Latest Location
gulp 4.0.0 4.0.0 3.9.1
To solve the issue I have done:
npm update
npm update -g
remove node_modules and run npm install lependu answer
remove node_modules, npm cache clean -f and run npm install lependu answer
Is there a way to fix this?
npm had some issues with publication of new packages this week and the week before too. See this So I guess an npm cache clean -f would help. If not, you can do nothing more, than wait.

npm WARN npm npm does not support Node.js v9.1.0

I updated to the latest node v9.1.0 and now npm doesn't work.
npm WARN npm npm does not support Node.js v9.1.0
It turns out that the current installed npm is not compatible with the new node and has a hard time updating.
The solution is to uninstall npm and then reinstall node which will contain the correct version of npm.
Here's how:
Uninstall npm.
Mac:
sudo npm uninstall -g npm
Windows:
npm uninstall -g npm
Install node from https://nodejs.org
Uninstall the global instance of npm:
npm uninstall -g npm
This will cause your system to fall back on the version of npm installed by node 9.1.0 and the warning will disappear.
What worked for me was to delete npm and npm cache from C:\Users\chrisd\AppData\Roaming
Then I ran npm i -g npm#next for the latest version of npm for Node 9.x
NPMJS.org has issued a new release 11.27.2017 -- npm v5.6.0
(You may not have to delete the npm/npm cacheif you just upgrade, but I had already done that before finding the new release)
NPMJS Release notes
Fixed my issue update to 5.71
npm uninstall -g npm
npm i -g npm#next
Had similar issue in linux/ubuntu, below helped solving it.
Remove existing versions of npm and node:
sudo apt --auto-remove purge npm
sudo apt --auto-remove purge nodejs
Re-install node
for me worked
npm uninstall -g npm
npm i -g npm#next
No need for manual installation or clearing the cache.
Run with admin credentials if needed.
I saw this warning after I upgraded to Node 10.4.1 after that I just ran npm uninstall -g npm with -g flag to remove it globally and the error was gone. I guess it updated my npm to version 6.1.0
Solution :
Go to the path where you can find the debug log (this file is found in your npm-cache folder) C:\Users\yourname\AppData\Roaming
Delete the NPM and NPM-Cache folder, but DO NOT reinstall node. Once deleted go back to your command line and re-use the command " npm install -g npm#latest "
What worked for me - On Ubuntu
Install nodejs
sudo apt install nodejs
Install npm
curl -L https://www.npmjs.com/install.sh | sudo sh
If you are unable to uninstall npm, instead you can skip that step and just
Reinstall npm https://nodejs.org/en/
This error occurs when the npm version not compatible with the node version. However npm uninstall -g npm also gives the same error for me.
So following steps work for me.
Option 1:
Step1: Follow this directory
C:\Users(your username)\AppData\Roaming
Step2: Delete the npm folder. And if there is a folder called `npm cache, delete it also.
Step3: Run npm clean cache —force ( — force is now required to clean cache)
If the above option is not worked for you please follow the below steps.
Option 2:
Follow this directory
C:\Users(your username)\AppData\Roaming
Delete the npm folder and if there is one mom cache folder.
Run npm clean cache --force ( -- force is now required to clean cache)
Make sure everything to do with Nodejs is deleted and uninstalled.
Reinstall Nodejs.
I had the same issue with npm when I have updated Node js on windows. I tried many things but only working solution was :
First uninstall npm with below command
npm uninstall -g npm
Now Install latest version
npm install npm#latest -g
If you are using Mac and brew, that's how I've got rid of this problem:
Even though I installed and reinstalled node with brew, with last version 11.8.0, apparently it kept using the last version
fdecollibus$ npm install --global gatsby-cli
npm WARN npm npm does not support Node.js v11.8.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
/usr/local/Cellar/node/11.8.0/bin/gatsby -> /usr/local/Cellar/node/11.8.0/lib/node_modules/gatsby-cli/lib/index.js
+ gatsby-cli#2.4.8
npm -v gave me back version 5.6.0. I've therefore noticed that /usr/local/lib/node_modules had wrong permissions assigned to root:wheel.
A chown did not fix the problem: I've had to manually delete the content of the folder (cd /usr/local/lib/node_modules and -careful - type rm -rf * ) to get rid of the folder.
Then I've run brew uninstall node and again brew install node, and finally npm -v gave me back 6.5.0
Executing npm uninstall -g npm gave me same error
Uninstall Node.js installed in the system
Goto c:\Program File\nodejs (default location of the nodejs installation). Remove all contents of the folder manually.
Remove npm, npm-cache folder from Roaming folder under your username.
Install Node.js again.
running npm install #angular/cli -g worked for me.
I was getting the below warning when I executed, npm install to install package.json for my angular project.
npm WARN npm npm does not support Node.js v9.1.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at https://nodejs.org/
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.ng-080b84bf08dd68e5.lock for ...\Angular\node
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
C:\Program Files\nodejs\node.exe: src\node_zlib.cc:437: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
According to #Ilyich, I uninstalled global npm, npm uninstall -g npm
And then I executed npm install to install my package, it installed successfully.
Navigate to the Appdata by typing %AppData% in the run or search.
Delete the npm and npm-cache folder and then install the nodejs again. It solved the issue for me.
If you are getting the same warnings while creating or importing an Angular project in an IDE such as Eclipse ,do the following:
File->New->Angular
In the window that appears change the versions of Nodejs and NPM to "use system installation"
...
If the process crashes at "installing packages for tooling via npm"
Close the terminal in IDE and manually go to the project directory and do "npm install".
Refresh the project in IDE
I had a similar issue trying to install other stuffs.
And looks like the npm version was not compatible with my node version.
In my case i had npm 5.4.2 and node v10.15.0
At the end of this process i had the version npm 6.7.0 and node v10.5.0
First Option:
I downgrade the version of node and other tools.
On terminal execute the next command with the version to be installed. (Example if we need change to node 8.14.1)
1.- Npm install -g node#8.14.1
Then we execute the command to uninstall the version to be removed.
2.- Npm uninstall -g node#8.15.0
After that we need execute the next command to set the new path
3.- Npm update -g node#8.14.1
Finally we only need execute the version to see if the changes were added successfully
4.- Node -v
In this case we will see the version as 8.14.1 and we finished the process.
If you want do it for Appium and Npm version you can open a new terminal and follow the same steps in order to change the version. For example:
Npm install -g appium#1.7.2
Npm uninstall -g appium#1.10.0
Npm update -g appium#1.7.2
Appium -v
In my case you must have the next versions:
Node 8.14.1
Npm 6.4.1
Other Way:
To solve it i just execute in the terminal the next line.
curl -L https://npmjs.org/install.sh | sh
After download a few files (took around of 10 minutes to see results in the terminal) i was able to continue working with the new latest and compatible version of both tools.
The next WARM was displayed in this case.
npm WARN npm npm does not support Node.js v10.15.0.
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at https://nodejs.org/
/Users
I am on a macOS and what ended up working for me was uninstalling npm, relinking Node, and reinstalling Node through Homebrew. (Prereqs: Have Homebrew installed and have a very confusing setup where npm and Node don't work together)
1. To uninstall homebrew:
If you are on a Mac, you probably don't see the AppData\Roamingfolder; you should instead go to npm root -g and delete the npm_modules folder. Now, when you type npm --version your computer should be confused.
2. Reinstalling node:
Try doing brew install node and if you already have node installed, your computer will ask you to reinstall it. If you do brew reinstall node and your versions of brew and npm look good, then you don't need to do the last step!
3. If you need to link the correct version of Node:
This step was something I think was my fault since I think I had installed Node through Homebrew as well as the actual online download. Follow the suggestions after brew link node which should take you to brew link --overwrite node. There will be around 7 directories that the command will not be able to overwrite, which you should all delete using sudo rm -rf directory_name. (Do use your common sense, don't delete something important.) After you are finally able to run the brew link --overwrite node command without any errors, you should then do brew reinstall node since you don't have npm anymore.
Tada! You hopefully now have version of npm and node that hopefully can work together.
Just install latest version of Node.js from https://nodejs.org
This will automatically update npm for you
Easiest way I found was to install the latest node with brew and the latest npm manually:
brew uninstall node
brew install node
npm install -g npm#latest
This removed the warning message. For some reason brew wasn't linking the new npm installed by node while it was updating node itself.
The easiest way(for windows) is to use the installer to remove node, then use it to reinstall node, at which time it will install the correct version of npm. running the above uninstall commands does not work, since the wrong version of node is installed, otherwise you wouldn't have this issue.
You can uninstall node current version, and install a early version that support npm. Then run npm install npm#latest -g and install current node version.
It's work for me
lowering the npm version worked for me (windows 10):
npm i npm#6.14.11
To upgrade the npm and Node:
Step 1. Uninstall the npm:
Mac: `sudo npm uninstall -g npm`
Windows: `npm uninstall -g npm`
Step 2: Install the latest version of Node: https://nodejs.org/en/

NPM Install is not installing dependencies

I'm attempting to install the Ushahidi V3 Client. I've been following the install process up until when I need to build the project from the source repo using npm and gulp - both of which I've had zero experience with. Whenever I run sudo npm install in the project directory, the process runs without complaints. However, when I run npm ls to verify that dependencies have been downloaded, I get a bunch of dependencies listed out as being missing.
How do I get npm to resolve all of these dependencies?
System Details
OS Ubuntu 14.04 (Trusty)
Node JS v0.12.9
NPM v3.5.1
What I've tried
Removing node_modules folder and re-running sudo npm install as referenced in this SO answer for a similar question: npm Gulp dependencies missing, even after running npm install
Uninstalling and reinstalling node and npm
#Strainy, as your research :D
It was a combination of running as sudo and not having the build-essentials.
That's why you should not use sudo npm
Follow these steps:
try npm uninstall. and then try npm install.
Also If it still doesn't work.
Try:
npm install -g npm-install-missing
or
npm-install-missing
For further reading, click here.

libsass bindings not found when using node-sass in nodejs

I want to use the node-sass module in my node.js v0.12 application to benefit from the performance of libsass.
I executed npm i node-sass to install the module, no errors so far.
Now the mess starts:
If I just open the REPL in a terminal to try out node-sass then everything works fine but if I include it in my project files and run node myfile.js then I get the following error message:
Error: `libsass` bindings not found. Try reinstalling `node-sass`?
The module's description at npmjs.com states that there might be a problem with resolving #!/usr/bin/env node under Ubuntu and how to fix this but that is not the case on my machine.
I could not find anything useful so I hope that you might help me.
I'm using node v0.12.2 under Ubuntu 14.10.
P.S.: I already tried to reinstall node-sass but without success. Nothing changes.
If you're using node 4.x or later then you need to reinstall gulp-sass with:
npm uninstall --save-dev gulp-sass
npm install --save-dev gulp-sass#2
You’ve probably tried to reinstall node-sass while using
npm install node-sass
or
npm uninstall node-sass
npm install node-sass
But node-sass is a C version of Sass. You have to use npm rebuild:
npm rebuild node-sass
I fixed this issue by deleting the existing /node_modules folder and running npm update
This is the only solution that worked for me,
sudo npm install -g n
sudo n 0.12.7
npm install node-sass#2
sudo npm -g install node-gyp#3
npm rebuild node-sass
This workaround (http://forum.ionicframework.com/t/error-running-gulp-sass/32311/20) worked form me.
Starting with this setup:
Cordova CLI: 5.3.3
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.5
Ionic App Lib Version: 0.3.9
ios-deploy version: Not installed
ios-sim version: 5.0.1
OS: Mac OS X Yosemite
Node Version: v4.1.1
Xcode version: Xcode 6.4 Build version 6E35b
I've found a solution to avoid to use 'sudo' command. We need before to fix npm permissions following this: https://docs.npmjs.com/getting-started/fixing-npm-permissions and fixing permissions for Node here: http://mawaha.com/permission-fix-node-js/ After this we can check and reinstall software without 'sudo' for npm, n or ionic.
I followed this step:
npm install -g n
rm -R node_modules/
npm install node-sass#3.3.3
npm -g install node-gyp#3
npm uninstall gulp-sass
npm install gulp-sass#2
npm rebuild node-sass
ionic setup sass
Why node-sass#3.3.3? Because it works with latest ionic version: https://github.com/driftyco/ionic/pull/4449
Combining the two answers above worked for me, plus additions:
sudo npm uninstall --save gulp-sass
npm install --save gulp-sass#2
npm update
npm rebuild node-sass
I have solved this to create the right directory with the specified binding.node file. You can download the bindings from github
https://github.com/sass/node-sass-binaries
Look in the error message the path where it tries to find the binding. In my case:
C:\Users\Martijn\Documents\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64-46
So I create this map win32-x64-46 and copy the binding from github in.
My solution was to downgrade to v0.10.25 (try sudo n 0.10.25 if you use n)
For me, this issue was caused in my build system (Travis CI) by doing something kind of dumb in my .travis.yml file. In effect, I was calling npm install before nvm use 0.12, and this was causing node-sass to be built for 0.10 instead of 0.12. My solution was simply moving nvm use out of the .travis.yml file’s before_script section to before the npm install command, which was in the before_install section.
This was a Node version issue for me, try using nvm to backtrack your version to something like: 0.10.32. This worked for me. I was running 4.2.2
I solved this problem by updating my gcc from 4.4.x to 4.7.x
No need for sudo or re-installations. This has always worked for me:
nvm use 0.12.2
This is the steps I undertook to fix my issue.
I updated my node manually to the latest version
Reinstalled node-sass
npm install node-sass
3.npm audit fix to fix certain vulnerabilities.
`npm audit fix`
5.npm install node-sass
`npm install node-sass`
worked and compiled properly thereafter.
I apologize if anything related to my answer isn't right. I'm just a beginner.
Hope it works for you

warn uninstall not installed for npm

I downloaded and installed nodejs on Windows. I'm trying to uninstall the version of typescript I have to get to an older version. When I run
npm uninstall typescript
or
npm uninstall -g typescript
I get
npm warn uninstall not installed in C:\Program Files\nodejs\node_modules: "typescript#0.9.7"
How can I uninstall typescript without having npm uninstall work? Thanks in advance.
You should have been able to uninstall typescript with the command
npm rm typescript
npm rm -g typescript
which is equivalent to uninstall. If that doesn't work, it is safe to find the typescript directory in Windows Explorer under C:\Program Files\nodejs\node_modules and remove it.
This should get you to a state with no typescript installed:
npm ls typescript
npm ls -g typescript
both show (empty).
Second point: npm view typescript version is not showing you information about your local setup, but rather the state of the npm repository, so it will always show you the version that corresponds to typescript#latest. At the time you asked this question, it was 0.9.7; it is now 1.3.0
Finally: to install a specific version of typescript such as 0.9.5, do
npm install -g typescript#0.9.5
Also, in general, you should make sure you have the latest node and npm. Updating npm on windows is a little tricky; you should follow the guide here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows
I recommend you to reinstall npm as this shouldn't happen. When the issue is still going on, open the directory and manually remove the files from that package.

Resources