Reputation: 1335
Windows 8.1, 64b
Last week all worked.
Whenever I run a heroku command it tries to install the heroku core plugins, example:
C:\Users\Usr\Documents\Aptana3_Workspace\mobile-site>heroku run
Installing core plugins heroku-apps, heroku-fork, heroku-git, heroku-local, heroku-run, heroku-status...
? module.js:338
? throw err;
? ^
?
? Error: Cannot find module './bin/npm-cli.js'
? at Function.Module._resolveFilename (module.js:336:15)
? at Function.Module._load (module.js:286:25)
? at Module.require (module.js:365:17)
? at require (module.js:384:17)
? at Object.<anonymous> (C:\Users\Usr\AppData\Local\heroku\node-v4.1.1-windows-x86\lib\node_modules\npm\cli.js:2:1)
? at Module._compile (module.js:434:26)
? at Object.Module._extensions..js (module.js:452:10)
? at Module.load (module.js:355:32)
? at Function.Module._load (module.js:310:12)
? at Function.Module.runMain (module.js:475:10)
! `run` is not a heroku command.
! Perhaps you meant `-h`, `2fa`, `auth`, `join`, `open`, `orgs`, `pg`, `ps` or `rake`.
! See `heroku help` for a list of available commands.
C:\Users\Usr\Documents\Aptana3_Workspace\mobile-site>
While the some commands work, even when showing the error msg:
C:\Users\Usr\Documents\Aptana3_Workspace\mobile-site>heroku restart
Installing core plugins heroku-apps, heroku-fork, heroku-git, heroku-local, heroku-run, heroku-status...
? module.js:338
? throw err;
? ^
?
? Error: Cannot find module './bin/npm-cli.js'
? at Function.Module._resolveFilename (module.js:336:15)
? at Function.Module._load (module.js:286:25)
? at Module.require (module.js:365:17)
? at require (module.js:384:17)
? at Object.<anonymous> (C:\Users\Usr\AppData\Local\heroku\node-v4.1.1-windows-x86\lib\node_modules\npm\cli.js:2:1)
? at Module._compile (module.js:434:26)
? at Object.Module._extensions..js (module.js:452:10)
? at Module.load (module.js:355:32)
? at Function.Module._load (module.js:310:12)
? at Function.Module.runMain (module.js:475:10)
Restarting dynos... failed
! You do not have access to the app mobile-site.
C:\Users\Usr\Documents\Aptana3_Workspace\mobile-site>
I reinstalled heroku, searched the web but no success..
Any ideas? Thx.
Upvotes: 2
Views: 1318
Reputation: 1
Happened to me as well on Windows. I turned off and back on command prompt window, reinstalled Heroku toolbelt and redeployed my app to Heroku, problem got solved.
Upvotes: 0
Reputation: 1335
The solution for me was:
Delete %LOCALAPPDATA%\heroku folder and try again (run heroku command)
I didn't think of this, I didn't even know this folder existed- That's what Heroku support said- so credit for him :)
p.s. to know where %LOCALAPPDATA% is just write in the console (windows)
echo %LOCALAPPDATA%
Upvotes: 2