2012-04-16 22 views
1

へのNode.jsアプリケーションをデプロイすると、私はgit push heroku masterを実行すると、私は次のエラーが表示されますは<a href="https://devcenter.heroku.com/articles/nodejs" rel="nofollow">dead simple tutorial on Heroku's website</a>を使用してHerokuの

 Using Node.js version: 0.4.7 
     Using npm version: 1.0.106 
-----> Fetching Node.js binaries 
-----> Vendoring node into slug 
-----> Installing dependencies with npm 
     npm ERR! Couldn't read dependencies. 
     npm ERR! Failed to parse json 
     npm ERR! Unexpected token } 
     npm ERR! File: /tmp/build_17bicinzz6vv0/package.json 
     npm ERR! JSON.parse Failed to parse package.json data. 
     npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript. 
     npm ERR! JSON.parse 
     npm ERR! JSON.parse This is not a bug in npm. 
     npm ERR! JSON.parse Tell the package author to fix their package.json file. 
     npm ERR! 
     npm ERR! System Linux 2.6.32-343-ec2 
     npm ERR! command "/tmp/node-node-c3iD/bin/node" "/tmp/node-npm-E95q/cli.js" "install" "--production" 
     npm ERR! cwd /tmp/build_17bicinzz6vv0 
     npm ERR! node -v v0.4.7 
     npm ERR! npm -v 1.0.106 
     npm ERR! file /tmp/build_17bicinzz6vv0/package.json 
     npm ERR! code EJSONPARSE 
     npm ERR! 
     npm ERR! Additional logging details can be found in: 
     npm ERR!  /tmp/build_17bicinzz6vv0/npm-debug.log 
     npm not ok 
!  Failed to install --production dependencies with npm 
!  Heroku push rejected, failed to compile Node.js app 

私package.jsonは以下のとおりです。

{ 
    "name": "node-example", 
    "version": "0.0.1", 
    "dependencies": { 
    "express": "2.2.0" 
    } 
} 

私は何も問題は絶対にありませんチュートリアルで得たJSON。ローカルで実行すると効果的ですなぜこのエラーが発生するのですか?

+4

完全に有効で、私の妥当性を確認します。ファイルの変更をコミットしてgitにプッシュして、正しいファイルがHerokuにプッシュされていることを確認してください。 –

+0

すべての変更をコミットしてプッシュしましたが、それでも機能しません。私は単純に同じチュートリアルで始め、すべてがうまくいった。私が最初にびっくりしたことは分かっていませんが、二度目にはうまくいきました。 –

答えて

1

私はこれが答え

npm ERR! Additional logging details can be found in: 
     npm ERR!  /tmp/build_17bicinzz6vv0/npm-debug.log 
0

は、Node.jsの

1

Herokuのチュートリアルによって提供されるpackage.jsonで全体のコンテンツを追加してみてくださいの新しいバージョンを試してみなければならなかった感覚を得ます... 私も同じエラーがありました。エンジンを追加することによって削除されました。

`{ 
    "name": "app-name", 
    "version": "0.0.1", 
    "private": true, 
    "dependencies": { 
     "express": "~2.5.8", 
     "ejs": "~0.7.1", 
     "socket.io": "~0.9.6" 
    }, 
    "engines": { 
    "node": "0.6.x" 
    } 
}`
関連する問題

 関連する問題