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

Failed to install node-sass #1387

Closed
elinnet opened this issue Feb 17, 2016 · 7 comments · Fixed by meetuparchive/meetup-web-components#296
Closed

Failed to install node-sass #1387

elinnet opened this issue Feb 17, 2016 · 7 comments · Fixed by meetuparchive/meetup-web-components#296

Comments

@elinnet
Copy link

elinnet commented Feb 17, 2016

Following a re-occurring error message I was getting on my code, see below:

ionic $ /Users/elinnet/wodbrain/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:22
    throw new Error('`libsass` bindings not found. Try reinstalling `node-sass`?');
    ^

Error: `libsass` bindings not found. Try reinstalling `node-sass`?
    at getBinding (/Users/elinnet/wodbrain/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:22:11)

I referred to the node-sass troubleshooting instructions and created a new folder to test the installation of node-sass. I receive the following error message - the result was nothing was installed. I've searched for answers on Stackoverflow and Github - but haven't been able to fix this problem. Could someone help?

npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm

npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.

npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

npm WARN deprecated lodash.padright@3.1.1: This package has been renamed. Use lodash.padend@^4.0.0.

npm WARN deprecated lodash.padleft@3.1.1: This package has been renamed. Use lodash.padstart@^4.0.0

npm WARN enoent ENOENT: no such file or directory, open '/Users/elinnet/package.json'
npm WARN elinnet No description
npm WARN elinnet No repository field.
npm WARN elinnet No README data
npm WARN elinnet No license field.

I'm on OSX with the following specs:

MacBook-Air:temp1 elinnet$ npm -v 3.5.2
MacBook-Air:temp1 elinnet$ node -v v4.0.0
MacBook-Air:temp1 elinnet$ node -p process.versions
{ http_parser: '2.5.0',
  node: '4.0.0',
  v8: '4.5.103.30',
  uv: '1.7.3',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  modules: '46',
  openssl: '1.0.2d' }

Many thanks.

@xzyfer
Copy link
Contributor

xzyfer commented Feb 17, 2016

This issue as been explained many times in the issue tracker.

Each binary is specific to a version of node, you're operating system, and architecture (32 vs 64bit). Any time this changes you need to rebuild the binary for your new environment. Previous binaries will persist so you can run node-sass on multiple environments i.e. VMs or docker containers.
#1247 (comment)

To build the correct binary after changing your environment run

npm rebuild node-sass

It's also seems like you're running a very old version of node-sass. However it's unclear because you skipped important parts of the troubleshooting guide

node -p "console.log(require('node-sass').info)"

@xzyfer xzyfer closed this as completed Feb 17, 2016
@elinnet
Copy link
Author

elinnet commented Feb 18, 2016

Hi @xzyfer . Thanks for your comments - as I'm very much a newbie at this. I've deleted the folder and re-run through troubleshooting instructions, input npm rebuild node-sass(the result is 'Binary is fine: exiting) and the
node -p "console.log(require('node-sass').info).

But I'm still getting an error. Have read through multiple comment streams and am not sure what I need to do next. Would you be able to advise?

I've also run 'npm install' but also receive an error related to node-sass.


Elins-MacBook-Air:temp1 elinnet$ npm -v
3.5.2
Elins-MacBook-Air:temp1 elinnet$ node -v
v4.0.0
Elins-MacBook-Air:temp1 elinnet$ node -p process.versions
{ http_parser: '2.5.0',
  node: '4.0.0',
  v8: '4.5.103.30',
  uv: '1.7.3',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  modules: '46',
  openssl: '1.0.2d' }
Elins-MacBook-Air:temp1 elinnet$ node -p process.platform
darwin
Elins-MacBook-Air:temp1 elinnet$ node -p process.arch
x64
Elins-MacBook-Air:temp1 elinnet$ npm install node-sass
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated lodash.padright@3.1.1: This package has been renamed. Use lodash.padend@^4.0.0.
npm WARN deprecated lodash.padleft@3.1.1: This package has been renamed. Use lodash.padstart@^4.0.0.

> node-sass@3.4.2 install /Users/elinnet/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node

> node-sass@3.4.2 postinstall /Users/elinnet/node_modules/node-sass
> node scripts/build.js

` /Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node ` exists. 
 testing binary.
Binary is fine; exiting.
/Users/elinnet
└── node-sass@3.4.2 

npm WARN enoent ENOENT: no such file or directory, open '/Users/elinnet/package.json'
npm WARN elinnet No description
npm WARN elinnet No repository field.
npm WARN elinnet No README data
npm WARN elinnet No license field.
Elins-MacBook-Air:temp1 elinnet$ ls
Elins-MacBook-Air:temp1 elinnet$ npm rebuild node-sass

> node-sass@3.4.2 install /Users/elinnet/node_modules/node-sass
> node scripts/install.js


> node-sass@3.4.2 postinstall /Users/elinnet/node_modules/node-sass
> node scripts/build.js

` /Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node ` exists. 
 testing binary.
Binary is fine; exiting.
node-sass@3.4.2 /Users/elinnet/node_modules/node-sass
Elins-MacBook-Air:temp1 elinnet$ ./node_modules/.bin/node-sass --version
-bash: ./node_modules/.bin/node-sass: No such file or directory
Elins-MacBook-Air:temp1 elinnet$ node -p "console.log(require('node-sass').info)"
node-sass   3.4.2   (Wrapper)   [JavaScript]
libsass     3.3.2   (Sass Compiler) [C/C++]
undefined

Elins-MacBook-Air:temp1 elinnet$ npm install node-sass
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated lodash.padright@3.1.1: This package has been renamed. Use lodash.padend@^4.0.0.
npm WARN deprecated lodash.padleft@3.1.1: This package has been renamed. Use lodash.padstart@^4.0.0.

> node-sass@3.4.2 install /Users/elinnet/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node

> node-sass@3.4.2 postinstall /Users/elinnet/node_modules/node-sass
> node scripts/build.js

` /Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node ` exists. 
 testing binary.
Binary is fine; exiting.
/Users/elinnet
└── node-sass@3.4.2 

npm WARN enoent ENOENT: no such file or directory, open '/Users/elinnet/package.json'
npm WARN elinnet No description
npm WARN elinnet No repository field.
npm WARN elinnet No README data
npm WARN elinnet No license field.
Elins-MacBook-Air:temp1 elinnet$ npm install

> node-sass@3.4.2 install /Users/elinnet/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node

> node-sass@3.4.2 postinstall /Users/elinnet/node_modules/node-sass
> node scripts/build.js

` /Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node ` exists. 
 testing binary.
Binary is fine; exiting.
/Users/elinnet
└── node-sass@3.4.2 

npm WARN enoent ENOENT: no such file or directory, open '/Users/elinnet/package.json'
npm WARN elinnet No description
npm WARN elinnet No repository field.
npm WARN elinnet No README data
npm WARN elinnet No license field.

```.

@xzyfer
Copy link
Contributor

xzyfer commented Mar 6, 2016

Looks like it installed fine to me.
On Feb 19, 2016 6:07 AM, "Elin Ng" notifications@github.com wrote:

Hi @xzyfer https://github.com/xzyfer

Elins-MacBook-Air:temp1 elinnet$ npm -v
3.5.2
Elins-MacBook-Air:temp1 elinnet$ node -v
v4.0.0
Elins-MacBook-Air:temp1 elinnet$ node -p process.versions
{ http_parser: '2.5.0',
node: '4.0.0',
v8: '4.5.103.30',
uv: '1.7.3',
zlib: '1.2.8',
ares: '1.10.1-DEV',
modules: '46',
openssl: '1.0.2d' }
Elins-MacBook-Air:temp1 elinnet$ node -p process.platform
darwin
Elins-MacBook-Air:temp1 elinnet$ node -p process.arch
x64
Elins-MacBook-Air:temp1 elinnet$ npm install node-sass
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated lodash.padright@3.1.1: This package has been renamed. Use lodash.padend@^4.0.0.
npm WARN deprecated lodash.padleft@3.1.1: This package has been renamed. Use lodash.padstart@^4.0.0.

node-sass@3.4.2 install /Users/elinnet/node_modules/node-sass
node scripts/install.js

Binary downloaded and installed at /Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node

node-sass@3.4.2 postinstall /Users/elinnet/node_modules/node-sass
node scripts/build.js

/Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node exists.
testing binary.
Binary is fine; exiting.
/Users/elinnet
└── node-sass@3.4.2

npm WARN enoent ENOENT: no such file or directory, open '/Users/elinnet/package.json'
npm WARN elinnet No description
npm WARN elinnet No repository field.
npm WARN elinnet No README data
npm WARN elinnet No license field.
Elins-MacBook-Air:temp1 elinnet$ ls
Elins-MacBook-Air:temp1 elinnet$ npm rebuild node-sass

node-sass@3.4.2 install /Users/elinnet/node_modules/node-sass
node scripts/install.js

node-sass@3.4.2 postinstall /Users/elinnet/node_modules/node-sass
node scripts/build.js

/Users/elinnet/node_modules/node-sass/vendor/darwin-x64-46/binding.node exists.
testing binary.
Binary is fine; exiting.
node-sass@3.4.2 /Users/elinnet/node_modules/node-sass
Elins-MacBook-Air:temp1 elinnet$ ./node_modules/.bin/node-sass --version
-bash: ./node_modules/.bin/node-sass: No such file or directory
Elins-MacBook-Air:temp1 elinnet$ node -p "console.log(require('node-sass').info)"
node-sass 3.4.2 (Wrapper) [JavaScript]
libsass 3.3.2 (Sass Compiler) [C/C++]
undefined


Reply to this email directly or view it on GitHub
#1387 (comment).

@saper
Copy link
Member

saper commented Mar 7, 2016

If you want to get rid of the annoying missing package.json dependency, just create a new project with npm init -y and install node sass as a dependency with npm install --save node-sass

@umair-khanzada
Copy link

@xzyfer npm rebuild node-sass works for me
thanks for save my day.

@linuxcarl
Copy link

linuxcarl commented Mar 6, 2017

funciono excelente el comando npm rebuild node-sass. muchas gracias

@hrasoa
Copy link

hrasoa commented May 13, 2017

npm rebuild node-sass worked too.
But how can we fix it forever ? As this issue always comes back ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants