alexanderGugel / ied

:package: Like npm, but faster - an alternative package manager for Node
http://alexandergugel.github.io/ied
MIT License
1.99k stars 53 forks source link

Problems combined with deployment tools such as Laravel Forge or executing using node child_process #85

Closed cyberkiko closed 8 years ago

cyberkiko commented 8 years ago

This is the error:

/usr/lib/node_modules/ied/lib/progress.js:30 process.stderr.cursorTo(0) ^ TypeError: Object # has no method 'cursorTo' at Object.progress.draw (/usr/lib/node_modules/ied/lib/progress.js:30:20) at Object.progress.start (/usr/lib/node_modules/ied/lib/progress.js:23:10) at fetchFromRegistry (/usr/lib/node_modules/ied/lib/fetch.js:16:12) at ReadStream. (/usr/lib/node_modules/ied/lib/fetch.js:70:5) at ReadStream.emit (events.js:95:17) at fs.js:1513:12 at Object.oncomplete (fs.js:107:15)

alexanderGugel commented 8 years ago

What Node version are you on?

cyberkiko commented 8 years ago

I'm using node 5.6.0, npm 3.6.0

parshap commented 8 years ago

process.stdout.cursorTo only exists when stdout is a tty:

$ node --version
v4.3.0
$ node -e 'console.error(process.stdout.cursorTo)'
[Function]
$ node -e 'console.error(process.stdout.cursorTo)' > /dev/null
undefined
alexanderGugel commented 8 years ago

Hmm I guess a simple process.stderr.isTTY check should fix it

alexanderGugel commented 8 years ago

Should be fixed. Thanks!

cyberkiko commented 8 years ago

Now it works, thanks ;)