lumo icon indicating copy to clipboard operation
lumo copied to clipboard

npm fails on FreeBSD

Open glor opened this issue 8 years ago • 5 comments

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

2017-12-04T00_42_56_997Z-debug.log

glor avatar Dec 04 '17 00:12 glor

no problem cloning the repository and running a local nmp install -g .

glor avatar Dec 04 '17 00:12 glor

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?

anmonteiro avatar Dec 04 '17 11:12 anmonteiro

Array(0)
[]

Array length is not OS specific. This is part of ecmascript and - of course - not different on FreeBSD

glor avatar Dec 06 '17 14:12 glor

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.)

zxygentoo avatar May 25 '18 12:05 zxygentoo

Same issue! @anmonteiro

kdbeall avatar Apr 25 '19 00:04 kdbeall