3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git push heroku master でnodeのバージョンがちげーよと怒られる時

Last updated at Posted at 2012-12-26
$ git push heroku master

   npm ERR! Not compatible with your version of node/npm: connect@2.3.4
   npm ERR! Required: {"node":">= 0.5.0"}
   npm ERR! Actual:   {"npm":"1.0.106","node":"0.4.7"}

package.jsonで宣言してるNode.jsのバージョンが古いよ!

って怒られてます。
古いサンプルをそのまま動かしてるとこういうこともあるようです。

package.jsonのNode.jsのバージョンを新しくして解決。

package.json
"engines" : {
"node": "0.8.x",
"npm":  "1.1.x"
},

このとき、注意。

  1. {}のあとにカンマ忘れずに
  2. nodeのバージョンが0.9.xだとエラー出るので0.8.xにした。herokuのnodeのバージョンが0.9ではないみたいなので、最新にすればいいってもんでもないみたい(2012.12.24時点)
  3. package.jsonを変更したら git add . して git commit すること

単純なことだけど、結構ハマりポイントですというかハマったし。

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?