无法运行heroku-cli命令 - npm问题

时间:2015-05-06 00:31:37

标签: heroku heroku-toolbelt

当尝试在Mac OS X Yosemite上运行heroku fork时,我突然遇到了导致CLI失效的严重错误。此问题以前没有发生,我相信CLI可能已经更新并开始导致问题。

~ ☽  heroku fork -a oldapp newapp
Installing plugin heroku-fork... npm ERR! Darwin 14.0.0
npm ERR! argv "/Users/Me/.heroku/iojs-v2.0.0-darwin-x64/bin/iojs" "/Users/JJ/.heroku/iojs-v2.0.0-darwin-x64/lib/node_modules/npm/cli.js" "install" "heroku-fork"
npm ERR! node v2.0.0
npm ERR! npm  v2.9.0
npm ERR! code ETARGET

npm ERR! notarget No compatible version found: heroku-cli-util@'>=1.9.0 <2.0.0'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["1.0.0","1.0.1","1.1.0","1.2.0","1.3.0","1.4.0","1.5.0","1.7.0","1.8.0","1.8.1"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'heroku-fork'
npm ERR! notarget

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Me/.heroku/npm-debug.log
ERROR: exit status 1
Usage: heroku COMMAND [--app APP] [command-specific-options]

Help topics, type "heroku help TOPIC" for more details:

  heroku version                       # print the version
  heroku plugins                       # manage plugins
  heroku update                        # update heroku-cli

我尝试通过以下方式删除并重新安装heroku cli:homebrew,官方安装程序,甚至是rubygem。由于错误似乎表明存在npm问题,我更新了npm和我的所有npm软件包,甚至能够显式运行npm install -g heroku-cli-util@1.10.0,但这些都没有任何区别。

这里出了什么问题/如何解决这个问题?这对我来说是一个关键问题。

1 个答案:

答案 0 :(得分:4)

我认为缓存会以某种方式卡住,请尝试删除~/.heroku并再次尝试。

编辑:事实证明这是Heroku私人npm服务器上的缓存问题。