Cli: Error: Cannot find module 'supports-color'

Created on 24 Oct 2017  路  7Comments  路  Source: heroku/cli

I've untarred the current snapshot version and tried to run it, but get this crash:

~$ heroku-cli-v6.14.36-15f8a25-linux-x64/bin/heroku version
module.js:529
    throw err;
    ^

Error: Cannot find module 'supports-color'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/nearbygamers/.local/share/heroku/client/node_modules/cli-engine-command/lib/color.js:8:22)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)

(I'm unable to move it to /usr/local as the instructions suggest due to limited permissions, but I don't think that's related.)

Most helpful comment

can you delete /home/nearbygamers/.local/share/heroku and try again?

All 7 comments

can you delete /home/nearbygamers/.local/share/heroku and try again?

This has fixed it for me, thanks.

/home/nearbygamers/.local/share/heroku

i can't find this this. i have the same above error. it is a link that you have to provided.
i have not the access to delete it because it is a html file..
please help me to delete this link or file to solve my problem

How can I delete this?
/home/nearbygamers/.local/share/heroku
even I try to heroku run bash, that error comes.

@mflf @RyoKurosaki nearbygamers is the name of my user on that particular system. You need to replace it with your own or use ~ to refer to it. Please be careful to understand what you are doing with rm as there is no undo.

I know it. my error is this.

Error: Cannot find module 'supports-color'
    at Function.Module._resolveFilename (module.js:542:15)
    at Function.Module._load (module.js:472:25)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/vagrant/.local/share/heroku/client/node_modules/cli-engine-command/lib/color.js:8:22)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
 !    error getting commands pid 2509 exit 1

but there is no /home/vagrant/.local/share/heroku

that "error getting commands" message at the bottom comes from the old ruby CLI. If you get that, you need to reinstall the CLI as you're on a very old legacy version.

Was this page helpful?
0 / 5 - 0 ratings