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 -v): 1.3.10node -v): v0.10.25node -p process.versions):node -p process.platform): linuxnode -p process.arch): x64node -p "require('node-sass').info"): not installednpm ls node-sass): not installedthis 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
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.