heroku/homebrew-brew

Heroku 7.0.45 starts up with a node error

mistydemeo opened this issue · 3 comments

After upgrading my Heroku install via brew upgrade, I'm getting this error on startup:

$ /usr/local/bin/heroku

module.js:557
    throw err;
    ^

Error: Cannot find module '/Users/mistydemeo/.local/share/heroku/client/package.json'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at run (/Users/mistydemeo/.local/share/heroku/client/node_modules/@cli-engine/engine/lib/cli.js:82:22)
    at Object.<anonymous> (/Users/mistydemeo/.local/share/heroku/client/bin/heroku.js:7:1)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)

I do have a /Users/mistydemeo/.local/share/heroku/client directory, and it does not have a package.json.

jdx commented

you've got some older code that's causing problems. Try deleting ~/.local/share/heroku/client and it should be resolved.

That fixed it! It reinstalled its plugins, and now it works.

Is this something it could try to do on its own?

jdx commented

I've tried but homebrew is sandboxed (using a chroot jail or something) and there is no way for it to automatically remove that directory as far as I can tell.