Node-sass: npm install fails on node version 0.10

Created on 11 May 2017  路  3Comments  路  Source: sass/node-sass

On older node versions (I tried 0.10,25 and 0.10.37) the npm install fails with the following error message:

/var/www/node_modules/grunt-sass/node_modules/node-sass/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/node_modules/string-width/index.js:2
const stripAnsi = require('strip-ansi');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/www/node_modules/grunt-sass/node_modules/node-sass/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js:2:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 8
  • NPM version (npm -v): 1.3.10
  • Node version (node -v): v0.10.25
  • Node Process (node -p process.versions):
    { http_parser: '1.0',
    node: '0.10.25',
    v8: '3.14.5.9',
    ares: '1.10.0',
    uv: '0.10.23',
    zlib: '1.2.8',
    modules: '11',
    openssl: '1.0.1f' }
  • Node Platform (node -p process.platform): linux
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"): not installed
  • npm node-sass versions (npm ls node-sass): not installed
Node 0.10 npm install

Most helpful comment

this is the cause of the problem there is a pull request on the way so this will be fixed soon. in the mean time the package.json with the exact version of "wide-align": "1.1.0" solves the problem.

All 3 comments

this is the cause of the problem there is a pull request on the way so this will be fixed soon. in the mean time the package.json with the exact version of "wide-align": "1.1.0" solves the problem.

Same issue here:

NPM version (npm -v): 1.4.21
Node version (node -v): v0.10.29
Node Process (node -p process.versions):
{ http_parser: '1.0',
node: '0.10.29',
v8: '3.14.5.8',
ares: '1.10.0',
uv: '0.10.27',
zlib: '1.2.8',
modules: '11',
openssl: '1.0.1k' }
Node Platform (node -p process.platform): linux
Node architecture (node -p process.arch): x64
node-sass version (node -p "require('node-sass').info"): not installed
npm node-sass versions (npm ls node-sass): (empty)

Got the error while trying to install gulp-sass : "gulp-sass": "^3.0.0"

@nagyfej thanks for pointing out that tread. It looks like they pushed a 1.1.2 fix that issue.

PS: Although we still build the binaries, Node 0.10 reached EOL in October 2016, so fixes/tests for that version are unlikely https://github.com/nodejs/LTS

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Pixelatex picture Pixelatex  路  3Comments

harukaeru picture harukaeru  路  3Comments

cjo2118 picture cjo2118  路  3Comments

samayo picture samayo  路  3Comments

amarbham picture amarbham  路  3Comments