Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Installing Node-Sass - ELIFECYCLE #1932

Closed
ronanfernandes opened this issue Mar 26, 2017 · 10 comments
Closed

Issue Installing Node-Sass - ELIFECYCLE #1932

ronanfernandes opened this issue Mar 26, 2017 · 10 comments

Comments

@ronanfernandes
Copy link

Trying to install a package that uses node-sass. No luck!
Every time I try to run 'npm install' or 'sudo npm install' in the app folder (where package.json is located) it breaks whenever it tries to install node-sass:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.13.1 install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2017-03-26T09_46_56_175Z-debug.log

Tried to install node-sass globally using: 'sudo npm install node-sass' and got the same error ELIFECYCLE.
BUT, when i tried 'sudo PATH="$PATH:/usr/bin" npm install node-sass, IT WORKED.
I could install node-sass globally.

Then I thought it was a PATH issue and tried 'sudo PATH="$PATH:/usr/bin" npm install node-sass' (or just npm install, to try to install the whole package).
No luck!

Always receiving this "ELIFECYCLE" error.
I´m new to Linux, used to develop in Windows + Xampp.

  • NPM version (npm -v): 4.4.4

  • Node version (node -v): 6.10.1

  • Node Process (node -p process.versions): versions
    { http_parser: '2.7.0',
    node: '6.10.1',
    v8: '5.1.281.95',
    uv: '1.9.1',
    zlib: '1.2.8',
    ares: '1.10.1-DEV',
    icu: '56.1',
    modules: '48',
    openssl: '1.0.2k' }

  • Node Platform (node -p process.platform): linux

  • Node architecture (node -p process.arch): x64

  • node-sass version (node -p "require('node-sass').info"):
    node-sass 4.5.1 (Wrapper) [JavaScript]
    libsass 3.5.0.beta.2 (Sass Compiler) [C/C++]

  • npm node-sass versions (npm ls node-sass): -- (empty)

@nschonni
Copy link
Contributor

Can you provide the full log in a Gist?

@noraj
Copy link

noraj commented Jun 25, 2017

v3.13.1/linux-x64-57 doesn't exist, it exist until v3.13.1/linux-x64-51

npm install node-sass@3.13.1                                                                                                                                                    noraj@manji

> node-sass@3.13.1 install /tmp/Rawsec/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/linux-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/linux-x64-57_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.5.3 install /tmp/Rawsec/node_modules/hexo-renderer-sass/node_modules/node-sass
> node scripts/install.js

Cached binary found at /home/noraj/.npm/node-sass/4.5.3/linux-x64-57_binding.node

> node-sass@3.13.1 postinstall /tmp/Rawsec/node_modules/node-sass
> node scripts/build.js

Building: /usr/bin/node /tmp/Rawsec/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli   '/tmp/Rawsec/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.6.2
gyp info using node@8.1.2 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.13\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.1.2
gyp verb command install [ '8.1.2' ]
gyp verb install input version string "8.1.2"
gyp verb install installing version: 8.1.2
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.1.2
gyp verb build dir attempting to create "build" dir: /tmp/Rawsec/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /tmp/Rawsec/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /tmp/Rawsec/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /tmp/Rawsec/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /tmp/Rawsec/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/tmp/Rawsec/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/tmp/Rawsec/node_modules/node-sass/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/tmp/Rawsec/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/noraj/.node-gyp/8.1.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/noraj/.node-gyp/8.1.2',
gyp info spawn args   '-Dnode_gyp_dir=/tmp/Rawsec/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/noraj/.node-gyp/8.1.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/tmp/Rawsec/node_modules/node-sass',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/noraj/.node-gyp/8.1.2
gyp verb `which` succeeded for `make` /usr/bin/make
make: Entering directory '/tmp/Rawsec/node_modules/node-sass/build'
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
  g++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/noraj/.node-gyp/8.1.2/include/node -I/home/noraj/.node-gyp/8.1.2/src -I/home/noraj/.node-gyp/8.1.2/deps/uv/include -I/home/noraj/.node-gyp/8.1.2/deps/v8/include -I../../nan  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -std=c++0x -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw   -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
In file included from ../src/binding.cpp:3:0:
../src/sass_context_wrapper.h:8:10: fatal error: sass/context.h: No such file or directory
 #include <sass/context.h>
          ^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [binding.target.mk:110: Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/tmp/Rawsec/node_modules/node-sass/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/tmp/Rawsec/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.9.33-1-MANJARO
gyp ERR! command "/usr/bin/node" "/tmp/Rawsec/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /tmp/Rawsec/node_modules/node-sass
gyp ERR! node -v v8.1.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@3.13.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/noraj/.npm/_logs/2017-06-25T18_24_14_741Z-debug.log

@noraj
Copy link

noraj commented Jun 25, 2017

@nschonni
Copy link
Contributor

@noraj1337 3.13.1 is old and doesn't support Node 8. It also used a submodule for the libsass files, which appears not to have been initialized if it can't find the header.

Closing since the original poster never responded

@noraj
Copy link

noraj commented Jun 26, 2017

I know it's old but https://github.com/knksmith57/hexo-renderer-sass was using it. And yes I was using Node 8.

@xzyfer
Copy link
Contributor

xzyfer commented Jun 26, 2017 via email

@mstrzoda
Copy link

I had similar problem. I switched to new machine and i expected that i just retrieve whole code from git, then just npm install and npm run build, but it stuck on getting node-sass 3.13.1. It still worked on my second computer, because this module was downloaded long time ago. The question is if this release: https://github.com/sass/node-sass/releases/download/v3.13.1/win32-ia32-57_binding.node existed half year ago and then you removed it. If yes, then people cannot trust this source anymore - suddenly your application does not build because brand new build machine didnt have your modules cached.

@nschonni
Copy link
Contributor

@mstrzoda there was never a binary provide for Node 8 for 3.13.1

@mstrzoda
Copy link

@nschonni a ok, so i had node 8, and npm tried to download node-sass 3.13.1 for node 8, which never existed, and on my old computer and on server we had older node, that's why it worked there. Complicated like Lost plot, but makes sense. Thank you!

@thesourav123
Copy link

thesourav123 commented Nov 10, 2017

@nschonni How to force npm to use node-sass 4.6.1 for node 8 and npm 5.5.1 instead of 3.13.1

@sass sass locked as resolved and limited conversation to collaborators Feb 28, 2018
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

6 participants