Heroku 安装错误
Heroku installation error
我一直在努力让 heroku 在我的 mac 上运行。我已经安装了 Heroku-Toolbelt。但是当我在 zsh 控制台上 运行 "heroku login" 时,我得到这个错误:
$ heroku login
heroku-cli: Installing core plugins...
▸ npm ERR! Darwin 15.3.0
▸ npm ERR! argv "/Users/Deepen/.heroku/node-v5.4.1-darwin-x64/bin/node"
"/Users/Deepen/.heroku/node-v5.4.1-darwin-x64/lib/node_modules/npm/cli.js"
"remove" "heroku-apps" "heroku-cli-addons" "heroku-fork" "heroku-git"
"heroku-local" "heroku-run" "heroku-spaces" "heroku-status"
▸ npm ERR! node v5.4.1
▸ npm ERR! npm v3.3.10
▸ npm ERR! code MODULE_NOT_FOUND
▸
▸ npm ERR! Cannot find module 'npm-autoinit/autoinit'
▸ npm ERR!
▸ npm ERR! If you need help, you may report this error at:
▸ npm ERR! <https://github.com/npm/npm/issues>
▸ npm WARN ENOENT ENOENT: no such file or directory, open '/Users/Deepen/.heroku/package.json'
▸ npm WARN EPACKAGEJSON .heroku No description
▸ npm WARN EPACKAGEJSON .heroku No repository field.
▸ npm WARN EPACKAGEJSON .heroku No README data
▸ npm WARN EPACKAGEJSON .heroku No license field.
▸ npm ERR! Darwin 15.3.0
▸ npm ERR! argv "/Users/Deepen/.heroku/node-v5.4.1-darwin-x64/bin/node" "/Users/Deepen/.heroku/node-v5.4.1-darwin-x64/lib/node_modules/npm/cli.js" "remove" "heroku-apps" "heroku-cli-addons" "heroku-fork" "heroku-git" "heroku-local" "heroku-run" "heroku-spaces" "heroku-status"
▸ npm ERR! node v5.4.1
▸ npm ERR! npm v3.3.10
▸
▸ npm ERR! Callback called more than once.
▸ npm ERR!
▸ npm ERR! If you need help, you may report this error at:
▸ npm ERR!
▸
▸ npm ERR! Please include the following file with any support request:
▸ npm ERR! /Users/Deepen/.heroku/npm-debug.log
▸ exit status 1
heroku-cli: Installing core plugins (retrying)...
我刚刚发布了一个修复程序,你能heroku update
再试一次吗?
这是我修复它的方法。
我检查了节点 5.9.1 在我的系统上的安装位置 (Mac El Capitan):
% which node
~/.nvm/versions/node/v5.9.1
然后我将整个东西复制到 ~/.heroku 下并更改了目录的名称:
cp -r ~/.nvm/versions/node/v5.9.1 ~/.heroku
mv ~/.heroku/v5.9.1 ~/.heroku/node-v5.9.1-darwin-x64
这对我有用,希望它也能帮助其他人,因为我花了很长时间才弄明白。
我一直在努力让 heroku 在我的 mac 上运行。我已经安装了 Heroku-Toolbelt。但是当我在 zsh 控制台上 运行 "heroku login" 时,我得到这个错误:
$ heroku login
heroku-cli: Installing core plugins...
▸ npm ERR! Darwin 15.3.0
▸ npm ERR! argv "/Users/Deepen/.heroku/node-v5.4.1-darwin-x64/bin/node"
"/Users/Deepen/.heroku/node-v5.4.1-darwin-x64/lib/node_modules/npm/cli.js"
"remove" "heroku-apps" "heroku-cli-addons" "heroku-fork" "heroku-git"
"heroku-local" "heroku-run" "heroku-spaces" "heroku-status"
▸ npm ERR! node v5.4.1
▸ npm ERR! npm v3.3.10
▸ npm ERR! code MODULE_NOT_FOUND
▸
▸ npm ERR! Cannot find module 'npm-autoinit/autoinit'
▸ npm ERR!
▸ npm ERR! If you need help, you may report this error at:
▸ npm ERR! <https://github.com/npm/npm/issues>
▸ npm WARN ENOENT ENOENT: no such file or directory, open '/Users/Deepen/.heroku/package.json'
▸ npm WARN EPACKAGEJSON .heroku No description
▸ npm WARN EPACKAGEJSON .heroku No repository field.
▸ npm WARN EPACKAGEJSON .heroku No README data
▸ npm WARN EPACKAGEJSON .heroku No license field.
▸ npm ERR! Darwin 15.3.0
▸ npm ERR! argv "/Users/Deepen/.heroku/node-v5.4.1-darwin-x64/bin/node" "/Users/Deepen/.heroku/node-v5.4.1-darwin-x64/lib/node_modules/npm/cli.js" "remove" "heroku-apps" "heroku-cli-addons" "heroku-fork" "heroku-git" "heroku-local" "heroku-run" "heroku-spaces" "heroku-status"
▸ npm ERR! node v5.4.1
▸ npm ERR! npm v3.3.10
▸
▸ npm ERR! Callback called more than once.
▸ npm ERR!
▸ npm ERR! If you need help, you may report this error at:
▸ npm ERR!
▸
▸ npm ERR! Please include the following file with any support request:
▸ npm ERR! /Users/Deepen/.heroku/npm-debug.log
▸ exit status 1
heroku-cli: Installing core plugins (retrying)...
我刚刚发布了一个修复程序,你能heroku update
再试一次吗?
这是我修复它的方法。
我检查了节点 5.9.1 在我的系统上的安装位置 (Mac El Capitan):
% which node
~/.nvm/versions/node/v5.9.1
然后我将整个东西复制到 ~/.heroku 下并更改了目录的名称:
cp -r ~/.nvm/versions/node/v5.9.1 ~/.heroku
mv ~/.heroku/v5.9.1 ~/.heroku/node-v5.9.1-darwin-x64
这对我有用,希望它也能帮助其他人,因为我花了很长时间才弄明白。