Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: process.stdout.cursorTo is not a function #29

Open
ebekebe opened this issue Feb 17, 2020 · 3 comments
Open

TypeError: process.stdout.cursorTo is not a function #29

ebekebe opened this issue Feb 17, 2020 · 3 comments

Comments

@ebekebe
Copy link

ebekebe commented Feb 17, 2020

When redirecting output away from the TTY to a file or a pipe, I get this error:

TypeError: process.stdout.cursorTo is not a function
    at getPackageDetails.then (/Users/benjamin/.npm/_npx/27879/lib/node_modules/npm-consider/index.js:100:22)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Steps to reproduce:

npx npm-consider install nodemon >/dev/null
@dgkimpton
Copy link

This happens for me with all packages on Windows. Maybe something in the latest version of Node broke it?

$ npm-consider install jasmine --save
GET https://registry.npmjs.org/jasmineTypeError: process.stdout.cursorTo is not a function
    at C:\Users\duncan\AppData\Roaming\npm\node_modules\npm-consider\index.js:100:22
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

$ npm --version 6.14.5
npm-consider --version 1.7.0

@ebekebe
Copy link
Author

ebekebe commented Jun 8, 2020

@dgkimpton Good point. I re-ran in Docker to have a reproducible environment.

$ docker run --rm node:8 npm --version
6.13.4

$ docker run --rm node:8 node --version
v8.17.0

$ docker run --rm node:8 npx npm-consider install nodemon
npx: installed 58 in 7.842s
GET https://registry.npmjs.org/nodemonTypeError: process.stdout.cursorTo is not a function
    at getPackageDetails.then (/root/.npm/_npx/1/lib/node_modules/npm-consider/index.js:100:22)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

$ docker run --rm node:10 npm --version
6.14.4

$ docker run --rm node:10 node --version
v10.21.0

$ docker run --rm node:10 npx npm-consider install nodemon
npx: installed 58 in 6.053s
GET https://registry.npmjs.org/nodemonTypeError: process.stdout.cursorTo is not a function
    at getPackageDetails.then (/root/.npm/_npx/1/lib/node_modules/npm-consider/index.js:100:22)
    at process._tickCallback (internal/process/next_tick.js:68:7)

$ docker run --rm node:12 npm --version
6.14.4

$ docker run --rm node:12 node --version
v12.18.0

$ docker run --rm node:12 npx npm-consider install nodemon
npx: installed 58 in 6.334s
GET https://registry.npmjs.org/nodemonTypeError: process.stdout.cursorTo is not a function
    at /root/.npm/_npx/1/lib/node_modules/npm-consider/index.js:100:22
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

@xsrvmy
Copy link

xsrvmy commented Jun 5, 2021

Not sure if this is still an issue, but you can use winpty npx to run npx instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants