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

NPM package install failing for versions 3.0.0-pre, 1.2.3 #751

Closed
valish opened this issue Mar 12, 2015 · 29 comments
Closed

NPM package install failing for versions 3.0.0-pre, 1.2.3 #751

valish opened this issue Mar 12, 2015 · 29 comments

Comments

@valish
Copy link

valish commented Mar 12, 2015

I came across this error initially while installing a package with a "node-sass" ~1.0.1 dependency. I then tried to install the gem without specifying a version and npm returned the same error.

$ sudo npm install node-sass
-
> node-sass@3.0.0-pre install /home/valish/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node

> node-sass@3.0.0-pre postinstall /home/valish/node_modules/node-sass
> node scripts/build.js

` /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node ` exists. 
 testing binary.
node: symbol lookup error: /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node: undefined symbol: _ZN2v86Object3SetENS_6HandleINS_5ValueEEES3_

npm ERR! node-sass@3.0.0-pre postinstall: `node scripts/build.js`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the node-sass@3.0.0-pre postinstall script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16-2-amd64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-sass"
npm ERR! cwd /home/valish
npm ERR! node -v v0.13.0-pre
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Thought it might have been related node-gyp package, however re-installing was not successful.

@am11
Copy link
Contributor

am11 commented Mar 12, 2015

Which OS is it? cat /proc/version; cat /etc/issue; lsb_release -a
Also, can you reproduce it with node v0.12.0 stable?

@valish
Copy link
Author

valish commented Mar 12, 2015

Here is the output for my system info:

$ cat /proc/version; cat /etc/issue; lsb_release -a
Linux version 3.16-2-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.3 (Debian 4.8.3-11) ) #1 SMP Debian 3.16.3-2 (2014-09-20)
Debian GNU/Linux 8 \n \l

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.0 (jessie)
Release:        8.0
Codename:       jessie

Attempting to reproduce with v.0.12.0:

$ node -v
v0.12.0
$ sudo npm install node-sass
|
> node-sass@3.0.0-pre install /home/valish/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node

> node-sass@3.0.0-pre postinstall /home/valish/node_modules/node-sass
> node scripts/build.js

` /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node ` exists. 
 testing binary.
node: symbol lookup error: /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node: undefined symbol: _ZN2v86Object3SetENS_6HandleINS_5ValueEEES3_

npm ERR! node-sass@3.0.0-pre postinstall: `node scripts/build.js`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the node-sass@3.0.0-pre postinstall script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16-2-amd64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-sass"
npm ERR! cwd /home/valish
npm ERR! node -v v0.13.0-pre
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

@am11
Copy link
Contributor

am11 commented Mar 12, 2015

Strange! I built the linux binaries using CentOS 5.11 and tested on Ubuntu 12.4:

vagrant@precise64:/tmp$  cat /proc/version; cat /etc/issue; lsb_release -a
Linux version 3.11.0-15-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #25~precise1-Ubunt
u SMP Thu Jan 30 17:39:31 UTC 2014
Ubuntu 12.04.4 LTS \n \l

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.4 LTS
Release:        12.04
Codename:       precise

vagrant@precise64:/tmp$ nvm use v0.12
Now using node v0.12.0

vagrant@precise64:/tmp$ npm install node-sass
/
> node-sass@3.0.0-pre install /tmp/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /tmp/node_modules/node-sass/vendor/linux-x64-14/binding.node

> node-sass@3.0.0-pre postinstall /tmp/node_modules/node-sass
> node scripts/build.js

` /tmp/node_modules/node-sass/vendor/linux-x64-14/binding.node ` exists.
 testing binary.
Binary is fine; exiting.
node-sass@3.0.0-pre node_modules/node-sass
├── get-stdin@4.0.1
├── nan@1.7.0
├── mkdirp@0.5.0 (minimist@0.0.8)
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.0.1, supports-color@1.3.0, strip-ansi@2.0.1, has-ansi@1.0.3)
├── meow@3.1.0 (object-assign@2.0.0, minimist@1.1.1, camelcase-keys@1.0.0, indent-string@1.2.1)
├── npmconf@2.1.1 (uid-number@0.0.5, inherits@2.0.1, osenv@0.1.0, ini@1.3.3, once@1.3.1, config-chain@1.1.8, nopt@3.0.1,
 semver@4.3.1)
├── gaze@0.5.1 (globule@0.1.0)
├── sass-graph@1.0.3 (commander@2.7.1, lodash@2.4.1, glob@4.5.2)
├── request@2.53.0 (caseless@0.9.0, json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, stringstream@0.0.4,
 tunnel-agent@0.4.0, oauth-sign@0.6.0, isstream@0.1.2, node-uuid@1.4.3, qs@2.3.3, combined-stream@0.0.7, form-data@0.2.0
, mime-types@2.0.9, http-signature@0.10.1, tough-cookie@0.12.1, bl@0.9.4, hawk@2.3.1)
└── pangyp@2.1.0 (which@1.0.9, osenv@0.1.0, rimraf@2.2.8, graceful-fs@3.0.6, nopt@3.0.1, glob@4.3.5, fstream@1.0.4, semv
er@4.2.2, minimatch@2.0.3, tar@1.0.3, request@2.51.0, npmlog@1.0.0)

vagrant@precise64:/tmp$ node -p "require('node-sass').info"
node-sass       3.0.0-pre       (Wrapper)       [JavaScript]
libsass         3.1.0   (Sass Compiler) [C/C++]

@valish
Copy link
Author

valish commented Mar 12, 2015

Seems like my sudo user was still using node v.0.13. I tried reproducing as root and here is the result:

root@inspire:/home/valish# nvm install 0.12.0
######################################################################## 100.0%
Now using node v0.12.0
root@inspire:/home/valish# node -v
v0.12.0
root@inspire:/home/valish# npm install node-sass
|
> node-sass@3.0.0-pre install /home/valish/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node

> node-sass@3.0.0-pre postinstall /home/valish/node_modules/node-sass
> node scripts/build.js

` /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node ` exists. 
 testing binary.
node: symbol lookup error: /home/valish/node_modules/node-sass/vendor/linux-x64-14/binding.node: undefined symbol: _ZN2v86Object3SetENS_6HandleINS_5ValueEEES3_
npm ERR! Linux 3.16-2-amd64
npm ERR! argv "/root/.nvm/versions/node/v0.12.0/bin/node" "/root/.nvm/versions/node/v0.12.0/bin/npm" "install" "node-sass"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.0.0-pre postinstall: `node scripts/build.js`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the node-sass@3.0.0-pre postinstall script 'node scripts/build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/valish/npm-debug.log

@am11
Copy link
Contributor

am11 commented Mar 12, 2015

@mgreter, @QuLogic, here is a new one. The binary built on old CentOS (v5.11, gcc 4.4.5, glibc 2.5 and libstdc++.so.6) is working on old Ubuntu (12.4), but not Debian 8.. Any thoughts?

@xzyfer, @nschonni, like @mgreter mentioned here, we cannot possibly cover all flavors of Linux without incorporating some package manager. Also the symbol not found is a low level exception and it does not get caught by JavaScript code (it is throwing in scripts/build where we have try-catch). Which means the manual build in such cases does not trigger.

@valish, I think your best bet is to build the binary manually:

git clone https://github.com/sass/node-sass --recursive
cd node-sass
git submodule update --recursive --init
npm install
# (it will throw the exception you mentioned above)
node script/build -f
# this should work, to wit:
node -p "require('./').info"

@valish
Copy link
Author

valish commented Mar 12, 2015

Thanks @am11! Running "npm install" in the repo following the "git submodule update.." installed the package fine. It didn't throw any exceptions.

@am11
Copy link
Contributor

am11 commented Mar 12, 2015

Oh, did it build the binary or used the downloaded one?
Can you please show the output?

@valish
Copy link
Author

valish commented Mar 12, 2015

v:~/Code/node$ cd node-sass/
v:~/Code/node/node-sass$ 
v:~/Code/node/node-sass$ git submodule update --recursive --init
v:~/Code/node/node-sass$ npm install
\
> node-sass@3.0.0-pre install /home/valish/Code/node/node-sass
> node scripts/install.js

Binary downloaded and installed at /home/valish/Code/node/node-sass/vendor/linux-x64-14/binding.node

> node-sass@3.0.0-pre postinstall /home/valish/Code/node/node-sass
> node scripts/build.js

` /home/valish/Code/node/node-sass/vendor/linux-x64-14/binding.node ` exists. 
 testing binary.
Binary is fine; exiting.
get-stdin@4.0.1 node_modules/get-stdin

mocha-lcov-reporter@0.0.2 node_modules/mocha-lcov-reporter

nan@1.7.0 node_modules/nan

cross-spawn@0.2.6 node_modules/cross-spawn
└── lru-cache@2.5.0

mkdirp@0.5.0 node_modules/mkdirp
└── minimist@0.0.8

chalk@1.0.0 node_modules/chalk
├── escape-string-regexp@1.0.3
├── ansi-styles@2.0.1
├── supports-color@1.3.0
├── strip-ansi@2.0.1 (ansi-regex@1.1.1)
└── has-ansi@1.0.3 (ansi-regex@1.1.1)

meow@3.1.0 node_modules/meow
├── object-assign@2.0.0
├── camelcase-keys@1.0.0 (map-obj@1.0.0, camelcase@1.0.2)
├── minimist@1.1.1
└── indent-string@1.2.1 (repeating@1.1.2)

npmconf@2.1.1 node_modules/npmconf
├── uid-number@0.0.5
├── inherits@2.0.1
├── osenv@0.1.0
├── ini@1.3.3
├── once@1.3.1 (wrappy@1.0.1)
├── nopt@3.0.1 (abbrev@1.0.5)
├── config-chain@1.1.8 (proto-list@1.2.3)
└── semver@4.3.1

gaze@0.5.1 node_modules/gaze
└── globule@0.1.0 (minimatch@0.2.14, glob@3.1.21, lodash@1.0.1)

request@2.53.0 node_modules/request
├── caseless@0.9.0
├── json-stringify-safe@5.0.0
├── aws-sign2@0.5.0
├── forever-agent@0.5.2
├── stringstream@0.0.4
├── oauth-sign@0.6.0
├── tunnel-agent@0.4.0
├── isstream@0.1.2
├── node-uuid@1.4.3
├── qs@2.3.3
├── combined-stream@0.0.7 (delayed-stream@0.0.5)
├── mime-types@2.0.9 (mime-db@1.7.0)
├── form-data@0.2.0 (async@0.9.0)
├── http-signature@0.10.1 (assert-plus@0.1.5, asn1@0.1.11, ctype@0.5.3)
├── bl@0.9.4 (readable-stream@1.0.33)
├── tough-cookie@0.12.1 (punycode@1.3.2)
└── hawk@2.3.1 (cryptiles@2.0.4, sntp@1.0.9, boom@2.6.1, hoek@2.11.1)

sass-graph@1.0.3 node_modules/sass-graph
├── commander@2.7.1 (graceful-readlink@1.0.1)
├── glob@4.5.2 (inherits@2.0.1, once@1.3.1, inflight@1.0.4, minimatch@2.0.3)
└── lodash@2.4.1

mocha@2.2.1 node_modules/mocha
├── escape-string-regexp@1.0.2
├── supports-color@1.2.1
├── diff@1.0.8
├── growl@1.8.1
├── commander@2.3.0
├── debug@2.0.0 (ms@0.6.2)
├── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)
└── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)

coveralls@2.11.2 node_modules/coveralls
├── lcov-parse@0.0.6
├── log-driver@1.2.4
├── request@2.40.0 (json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, oauth-sign@0.3.0, stringstream@0.0.4, tunnel-agent@0.4.0, qs@1.0.2, node-uuid@1.4.3, mime-types@$
.0.2, form-data@0.1.4, http-signature@0.10.1, tough-cookie@0.12.1, hawk@1.1.1)
└── js-yaml@3.0.1 (argparse@0.1.16, esprima@1.0.4)

jscoverage@0.5.9 node_modules/jscoverage
├── xfs@0.1.8
├── debug@1.0.3 (ms@0.6.2)
├── ejs@1.0.0
├── optimist@0.3.1 (wordwrap@0.0.2)
├── coffee-script@1.9.1
└── uglify-js@2.4.15 (uglify-to-browserify@1.0.2, async@0.2.10, optimist@0.3.7, source-map@0.1.34)

pangyp@2.1.0 node_modules/pangyp
├── which@1.0.9
├── osenv@0.1.0
├── rimraf@2.2.8
├── graceful-fs@3.0.6
├── nopt@3.0.1 (abbrev@1.0.5)
├── glob@4.3.5 (inherits@2.0.1, once@1.3.1, inflight@1.0.4)
├── fstream@1.0.4 (inherits@2.0.1)
├── semver@4.2.2
├── minimatch@2.0.3 (brace-expansion@1.1.0)
├── npmlog@1.0.0 (ansi@0.3.0, gauge@1.0.2, are-we-there-yet@1.0.3)
├── tar@1.0.3 (inherits@2.0.1, block-stream@0.0.7)
└── request@2.51.0 (caseless@0.8.0, json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, stringstream@0.0.4, oauth-sign@0.5.0, tunnel-agent@0.4.0, node-uuid@1.4.3, qs@2.3
.3, mime-types@1.0.2, combined-stream@0.0.7, form-data@0.2.0, bl@0.9.4, http-signature@0.10.1, tough-cookie@0.12.1, hawk@1.1.1)

jshint@2.6.3 node_modules/jshint
├── strip-json-comments@1.0.2
├── underscore@1.6.0
├── exit@0.1.2
├── console-browserify@1.1.0 (date-now@0.1.4)
├── minimatch@1.0.0 (sigmund@1.0.0, lru-cache@2.5.0)
├── shelljs@0.3.0
├── cli@0.6.5 (glob@3.2.11)
└── htmlparser2@3.8.2 (domelementtype@1.3.0, entities@1.0.0, domhandler@2.3.0, readable-stream@1.1.13, domutils@1.5.1)

@am11
Copy link
Contributor

am11 commented Mar 12, 2015

This is strange. Because it downloaded ditto binary with npm install node-sass and threw symbol not found exception ❗

@AKST
Copy link

AKST commented Mar 13, 2015

I'm encountering this issue as well, but on OS X along with stable v0.12.0. If it's any help I've installed node via tj/n. Here's the shell output if it helps.

$ npm install

|
> node-sass@1.2.3 install /Users/Angus/code/app/node_modules/broccoli-sass/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /Users/Angus/code/app/node_modules/broccoli-sass/node_modules/node-sass/vendor/darwin-x64/binding.node

> node-sass@1.2.3 postinstall /Users/Angus/code/app/node_modules/broccoli-sass/node_modules/node-sass
> node scripts/build.js

`darwin-x64` exists; testing
module.js:355
  Module._extensions[extension](this, filename);
                               ^
Error: Module did not self-register.
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/Angus/code/app/node_modules/broccoli-sass/node_modules/node-sass/lib/index.js:181:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! node-sass@1.2.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@1.2.3 postinstall script 'node scripts/build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Angus/code/app/npm-debug.log

@xzyfer
Copy link
Contributor

xzyfer commented Mar 13, 2015

@AKST node-sass@1.2.3 was release before node@0.12 existed so it's not supported. Please open an issue with the broccoli-sass team to update to node-sass@2.0.1 or better yet node-sass@3.0.0 (when it's available). Until then please downgrade node to 0.10 or use nvm to manage multiple node versions.

@QuLogic
Copy link
Contributor

QuLogic commented Mar 13, 2015

$ echo _ZN2v86Object3SetENS_6HandleINS_5ValueEEES3_ | c++filt
v8::Object::Set(v8::Handle<v8::Value>, v8::Handle<v8::Value>)

You need newer v8, apparently.

@saper
Copy link
Member

saper commented Mar 13, 2015

But normally v8 is built in statically in node? Can you post the output of

ldd vendor/linux-x64-14/binding.node
ldd `which node`
nm vendor/linux-x64-14/binding.node

The last one will produce a lot of output so maybe put it on gist.github.com and link here.

@valish
Copy link
Author

valish commented Mar 13, 2015

From my node-sass repo directory:

v:~/Code/node/node-sass$ ldd vendor/linux-x64-14/binding.node
        linux-vdso.so.1 (0x00007fff71bfc000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff43598d000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff43568c000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff435475000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff435258000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff434eaf000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff43603b000)
v:~/Code/node/node-sass$ ldd `which node`
        linux-vdso.so.1 (0x00007fff916f6000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f418110e000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4180f0a000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4180bfe000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f41808fd000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f41806e7000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f41804c9000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4180120000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4181333000)
v:~/Code/node/node-sass$ nm vendor/linux-x64-14/binding.node &> symbols.txt

The output for the nm command: https://gist.github.com/valish/e7c84877bff7d68a6510

@saper
Copy link
Member

saper commented Mar 13, 2015

Great! Thanks. Now I need (also as gist)

nm `which node`

@valish
Copy link
Author

valish commented Mar 13, 2015

Output for nm 'which node':
https://gist.github.com/valish/f33cef1a378a8c3d3a77

@saper
Copy link
Member

saper commented Mar 13, 2015

What is your

which node

What is your

sha1sum `which node`

Is it the same as

sha1sum /root/.nvm/versions/node/v0.12.0/bin/node

If not, then you gave different node binaries somewhere.

For the node binary you gave me nm dump for - the dump is correct, it will work with the binding library. I think something is invoking wrong binary version of node. Maybe you have 0.10 installed somewhere under .nvm?

I think something is wrong with your nvm selection.

@valish
Copy link
Author

valish commented Mar 13, 2015

$ which node
/home/valish/.nvm/versions/node/v0.12.0/bin/node
$ sha1sum `which node`
0c9d28d937e7e2d71173b4fa9fee7c1369169164  /home/valish/.nvm/versions/node/v0.12.0/bin/node
$ sudo sha1sum /root/.nvm/versions/node/v0.12.0/bin/node
0c9d28d937e7e2d71173b4fa9fee7c1369169164  /root/.nvm/versions/node/v0.12.0/bin/node

I noticed my nvm selection not synced with my root user. Running node -v as root shows v0.13.0-pre. It also appears that I have 0.10 installed under nvm.

$ nvm list
    iojs-v1.5.0
       v0.10.36
       v0.11.14
->      v0.12.0
         system

@AKST
Copy link

AKST commented Mar 13, 2015

@xzyfer yeah I think that's what I'll do for now, they seemed to have picked up on this themselves

@am11
Copy link
Contributor

am11 commented Mar 13, 2015

IMO: using node.js beta version is really a bad idea, especially if you use any C++ module based package. And using pre build of node.js (unreleased nightly) is absolutely a terrible idea, because there is no guarantee if anything would work.

@QuLogic, thanks. This is true as it seems like OP has some issue with nvm installation. Because the exact binary, when he is downloading within the node-sass cloned directory, is working just fine.

@valish, if this issue is not with node-sass package, please consider closing it.

@valish valish closed this as completed Mar 13, 2015
@saper
Copy link
Member

saper commented Mar 13, 2015

node-0.13 as of now has the same ABI as node-0.12 so it should be ok to use. Would be good to figure out if there are any issues. There is some work underway to upgrade libuv and that might break the ABI and the new NODE_MODULE_VERSION might be needed then.

@valish It would be good anyway to figure out what is wrong with your installation. I strongly suspect something is messed up with the installation (do you have node_modules/.bin in your PATH ? Maybe there is some older node binary there?). Can you clean some clean start (maybe using newly created user?)

@am11
Copy link
Contributor

am11 commented Mar 13, 2015

@saper, that is not the only reason it can go wrong. See what happened with c++ dependent modules when 0.11 landed. v0.11 was one of the reasons io.js came into existence!

@saper
Copy link
Member

saper commented Mar 13, 2015

I don't know that 0.11 story. C++ are the problem outlined in #517 that's the Linux equivalent of DLL hell :(

If clang comes to Linux distributions (see the Linux Foundation project) it will only become worse.

But I prefer to find out what is @valish actual problem instead of theorizing. I have ran out of ideas because the symbol missing is actually present in the node binary. Something going bad with the runtime linker or a wrong binary lying somewhere indeed.

@am11
Copy link
Contributor

am11 commented Mar 13, 2015

@saper
Copy link
Member

saper commented Mar 13, 2015

I am out of ideas. The only one left is

npm config ls -l

@valish
Copy link
Author

valish commented Mar 13, 2015

Here is my output for npm config ls -l:

; cli configs
long = true
user-agent = "npm/2.5.1 node/v0.12.0 linux x64"

; userconfig /home/valish/.npmrc
email = "andrew@vali.sh"
init.author.email = "="
init.author.name = "="

; default values
access = null
always-auth = false
bin-links = true
browser = null
ca = null
cache = "/home/valish/.npm"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
color = true
depth = null
description = true
dev = false
editor = "vi"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
globalconfig = "/home/valish/.nvm/versions/node/v0.12.0/etc/npmrc"
globalignorefile = "/home/valish/.nvm/versions/node/v0.12.0/etc/npmignore"
group = 1000
heading = "npm"
https-proxy = null
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "/home/valish/.npm-init.js"
init-version = "1.0.0"
json = false
key = null
link = false
local-address = undefined
loglevel = "warn"
; long = false (overridden)
message = "%s"
node-version = "0.12.0"
npat = false
onload-script = null
optional = true
parseable = false
prefix = "/home/valish/.nvm/versions/node/v0.12.0"
production = false
proprietary-attribs = true
proxy = null
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
rollback = true
save = false
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-prefix = "^"
scope = ""
searchexclude = null
searchopts = ""
searchsort = "name"
shell = "/bin/bash"
shrinkwrap = true
sign-git-tag = false
spin = true
strict-ssl = true
tag = "latest"
tmp = "/tmp"
umask = 18
unicode = true
unsafe-perm = true
usage = false
user = 1000
; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch}" (overridden)
userconfig = "/home/valish/.npmrc"
version = false
versions = false
viewer = "man"

I will try to reproduce with a new user as well.

@valish
Copy link
Author

valish commented Mar 13, 2015

I created a new user on my machine, installed nvm, then:

bazz@inspire:~$ node -v
v0.13.0-pre
bazz@inspire:~$ nvm list
->       system
node -> stable (-> N/A) (default)
iojs -> iojs- (-> N/A) (default)
bazz@inspire:~$ nvm install 0.12.0
######################################################################## 100.0%
Now using node v0.12.0
bazz@inspire:~$ node -v
v0.12.0
bazz@inspire:~$ sudo node -v
[sudo] password for bazz: 
v0.13.0-pre
bazz@inspire:~$ sudo su
root@inspire:/home/bazz# nvm use 0.12.0
Now using node v0.12.0
root@inspire:/home/bazz# node -v
v0.12.0
root@inspire:/home/bazz# npm install node-sass
\
> node-sass@3.0.0-pre install /home/bazz/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /home/bazz/node_modules/node-sass/vendor/linux-x64-14/binding.node

> node-sass@3.0.0-pre postinstall /home/bazz/node_modules/node-sass
> node scripts/build.js

` /home/bazz/node_modules/node-sass/vendor/linux-x64-14/binding.node ` exists. 
 testing binary.
node: symbol lookup error: /home/bazz/node_modules/node-sass/vendor/linux-x64-14/binding.node: undefined symbol: _ZN2v86Object3SetENS_6HandleINS_5ValueEEES3_
npm ERR! Linux 3.16-2-amd64
npm ERR! argv "/root/.nvm/versions/node/v0.12.0/bin/node" "/root/.nvm/versions/node/v0.12.0/bin/npm" "install" "node-sass"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.0.0-pre postinstall: `node scripts/build.js`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the node-sass@3.0.0-pre postinstall script 'node scripts/build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/bazz/npm-debug.log

I decided to stay logged as root because it would reset the sudo node version back to 0.13 if I closed it.

saper added a commit to saper/node-sass that referenced this issue Mar 23, 2015
@saper
Copy link
Member

saper commented Jun 28, 2015

Most probably nvm is a problem, I've managed to install node-sass on a clean system using nodesource.com apt repository. See #1013 (comment)

@jimmycann
Copy link

Reinstalling Node through linuxbrew solved this for me. Sorry I don't have any specifics for you, but for anyone who stumbles across here, that might be your fix.

jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants