npm fails on FreeBSD
OS: FreeBSD I suspect you expect the binary to be named 'nodejs' and not 'node'?
npm output:
/usr/local/bin/lumo -> /usr/local/lib/node_modules/lumo-cljs/bin/lumo.js
[email protected] install /usr/local/lib/node_modules/lumo-cljs node scripts/npm_install.js || nodejs scripts/npm_install.js
/usr/local/lib/node_modules/lumo-cljs/node_modules/progress/lib/node-progress.js:155
complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete);
^
RangeError: Invalid array length
at ProgressBar.render (/usr/local/lib/node_modules/lumo-cljs/node_modules/progress/lib/node-progress.js:155:14)
at ontimeout (timers.js:471:11)
at tryOnTimeout (timers.js:306:5)
at Timer.listOnTimeout (timers.js:266:5)
sh: nodejs: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: node scripts/npm_install.js || nodejs scripts/npm_install.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install 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! /root/.npm/_logs/2017-12-04T00_42_56_997Z-debug.log
no problem cloning the repository and running a local nmp install -g .
we try both node and nodejs.
This looks to be an issue with the printed line: complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete);
Apparently 0 is not a valid Array length in FreeBSD?
Array(0)
[]
Array length is not OS specific. This is part of ecmascript and - of course - not different on FreeBSD
Run into the same problem today. It turns out to be platform2release has no freebsd, then got an url with undefined in it, then a 404 response with no content-length then len becomes NaN and so on..
Maybe it would be nice to add an explicit check for supported platforms in the script to avoid confusion.
And, @anmonteiro are you planning to add FreeBSD support? :) (I ended up boot release one myself.)
Same issue! @anmonteiro