Skip to content

Commit

Permalink
Add a version to the sample package.json.
Browse files Browse the repository at this point in the history
Without this `myapp` throws the following when deployed to Heroku:

    -----> Installing dependencies with npm
           npm ERR! Couldn't read dependencies.

           npm ERR! Error: 'version' field missing
           npm ERR! 'version' Must be X.Y.Z, with an optional trailing tag.
           npm ERR! See the section on 'version' in `npm help json`
           npm ERR!     at /tmp/node-npm-a99U/lib/utils/read-json.js:336:13
           npm ERR!     at /tmp/node-npm-a99U/lib/utils/read-json.js:134:32
           npm ERR!     at P (/tmp/node-npm-a99U/lib/utils/read-json.js:110:40)
           npm ERR!     at [object Object].<anonymous> (fs.js:115:5)
           npm ERR!     at [object Object].emit (events.js:64:17)
           npm ERR!     at afterRead (fs.js:1111:12)
           npm ERR!     at Object.wrapper [as oncomplete] (fs.js:254:17)
           npm ERR! You may report this log at:
           npm ERR!     <http://github.com/isaacs/npm/issues>
           npm ERR! or email it to:
           npm ERR!     <npm-@googlegroups.com>
           npm ERR!
           npm ERR! System Linux 2.6.32-342-ec2
           npm ERR! command "/tmp/node-node-z9p0/bin/node" "/tmp/node-npm-a99U/cli.js" "install"
           npm ERR! cwd /tmp/build_1qpkl3ftzyifk
           npm ERR! node -v v0.6.10
           npm ERR! npm -v 1.1.1
           npm ERR! message 'version' field missing
           npm ERR! message 'version' Must be X.Y.Z, with an optional trailing tag.
           npm ERR! message See the section on 'version' in `npm help json`
           npm ERR!
           npm ERR! Additional logging details can be found in:
           npm ERR!     /tmp/build_1qpkl3ftzyifk/npm-debug.log
           npm not ok
     !     Failed to install dependencies with npm
     !     Heroku push rejected, failed to compile Node.js app
  • Loading branch information
timshadel committed Mar 1, 2012
1 parent df6b204 commit 485c390
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -36,6 +36,7 @@ You can specify the versions of Node.js and npm your application requires using

{
"name": "myapp",
"version": "0.0.1",
"engines": {
"node": ">=0.4.7 <0.7.0",
"npm": ">=1.0.0"
Expand Down

0 comments on commit 485c390

Please sign in to comment.