Cli: Cannot read property 'close' of undefined

Created on 10 Jan 2018  路  8Comments  路  Source: heroku/cli

I'm getting an error when running heroku on Windows 10 in Git Bash. When running the command in Command Prompt it works fine. Cannot read property 'close' of undefined

node -v returns v8.9.4
npm -v returns 5.6.0

capture

Most helpful comment

I went to the file referenced in the error \Heroku\clientnode_modules\chalk\index.js and commented out lines 72-115. Was able to get Heroku to run.

All 8 comments

Same problem, I'm running Win10 64 bit:
npm -v returns 5.6.0
node -v returns 9.4.0

I am having the same issue as above.

This worked for me. Since i installed the cli while i had a previous version already installed, i uninstalled the old version , then installed the new one

I went to the file referenced in the error \Heroku\clientnode_modules\chalk\index.js and commented out lines 72-115. Was able to get Heroku to run.

Thanks Tonykushe. I installed Angular CLI: 1.7.4 and worked for me too.

I am still seeing this exact issue with Heroku CLI version 7.0.86 on Windows 64 bit.
The workaround @arandoplh suggested seems to work sometimes, but not always.
Is there a real solution for this anywhere?

OK, based on this, it looks like the issue is conflicting versions of ansi-styles. Removing the heroku client node-modules and reinstalling seems to have fixed it for me.

I鈥檓 not sure why this issue is closed. All the solutions seem to require commenting out files and manually adjusting things. Shouldn鈥檛 the goal be to get this to work without any strange workarounds?

Was this page helpful?
0 / 5 - 0 ratings