3

I'm trying to deploy a compoundjs (a.k.a. railwayjs) to Heroku or Nodejitsu as a my first end to end test of NodeJS.

Steps

  1. Node installation: 0.8.16
  2. Heroku tools installation
  3. npm install compound -g (v1.1.4-1)
  4. Sample heroku app as described in CompoundJS's Heroku guide

    compound init heroku-app
    cd heroku-app
    sudo npm link
    compound g crud post title content
    
  5. Adjustment in packages.json: added engines as follows

    "engines": {
      "node": "0.8.x",
      "npm": "1.1.x"
    },
    
  6. foreman start -> application works perfect

  7. git add and commit
  8. git push heroku master
  9. heroku ps:scale web=1 (only first time)

After that, application is deployed and accesible through a test host of heroku. Application index works ok, but an error page is displayed when trying to create a new blog post.

According other reports, this issue is related with dependencies versions. According to git push output to heroku, following versions are being used:

   Resolving engine versions
   Using Node.js version: 0.8.14
   Using npm version: 1.1.65
   ....
   (main dependencies)
   npm http GET https://registry.npmjs.org/ejs/-/ejs-0.8.3.tgz
   npm http GET https://registry.npmjs.org/coffee-script/-/coffee-script-1.4.0.tgz
   npm http 200 https://registry.npmjs.org/seedjs
   npm http GET https://registry.npmjs.org/seedjs/-/seedjs-0.0.4.tgz
   npm http 200 https://registry.npmjs.org/compound
   npm http 200 https://registry.npmjs.org/ejs-ext/-/ejs-ext-0.1.4.tgz
   npm http 200 https://registry.npmjs.org/express
   npm http GET https://registry.npmjs.org/compound/-/compound-1.1.4-1.tgz
   npm http GET https://registry.npmjs.org/express/-/express-3.0.5.tgz
   npm http 200 https://registry.npmjs.org/jugglingdb
   npm http 200 https://registry.npmjs.org/stylus
   npm http 200 https://registry.npmjs.org/ejs/-/ejs-0.8.3.tgz
   npm http GET https://registry.npmjs.org/jugglingdb/-/jugglingdb-0.2.0-9.tgz
   npm http GET https://registry.npmjs.org/stylus/-/stylus-0.31.0.tgz
   npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.4.0.tgz
   npm http 200 https://registry.npmjs.org/seedjs/-/seedjs-0.0.4.tgz
   npm http 200 https://registry.npmjs.org/stylus/-/stylus-0.31.0.tgz
   npm http 200 https://registry.npmjs.org/express/-/express-3.0.5.tgz
   npm http 200 https://registry.npmjs.org/compound/-/compound-1.1.4-1.tgz

I face the same issue when deploying to nodejitsu (exactly the same). Any idea ? I'm poiting to specific dependencies versions, so I assume that this is issue would not be related with outdated dependencies used in server.

Thanks.

UPDATE with Nodejitsu related information:

Nodejitsu log on jitsu deploy

   info:    Welcome to Nodejitsu storni
   info:    jitsu v0.11.4, node v0.8.16
   info:    It worked if it ends with Nodejitsu ok
   info:    Executing command deploy
   info:    Analyzing application dependencies in server.js
   warn:    Local package version appears to be old
   warn:    The package.json version will be incremented automatically
   warn:    About to write F:\repo\mine\last-jitsu-test\package.json
   data:
   data:    {
   data:        scripts: { test: 'nodeunit test/*/*', start: 'server.js' },
   data:        name: 'last-jitsu-test',
   data:        version: '0.0.1-5',
   data:        dependencies: {
   data:            coffee-script: '>= 1.1.1',
   data:            stylus: '0.31.0',
   data:            seedjs: '0.0.4',
   data:            compound: '1.1.4-1',
   data:            ejs-ext: '0.1.4',
   data:            express: '3.0.5',
   data:            ejs: '0.8.3',
   data:            jugglingdb: '>= 0.1.0'
   data:        },
   data:        devDependencies: {
   data:            sinon: '*',
   data:            semicov: '*',
   data:            nodeunit: '*'
   data:        },
   data:        subdomain: 'storni.last-jitsu-test',
   data:        main: 'server.js',
   data:        engines: { npm: '1.1.x', node: '0.8.x' }
   data:    }
   data:
   prompt: Is this ok?:  (yes)
   info:    Creating snapshot 0.0.1-5
   info     Uploading: [=============================] 100%
   info:    Updating app last-jitsu-test
   info:    Activating snapshot 0.0.1-5 for last-jitsu-test
   info:    Starting app last-jitsu-test
   info:    App last-jitsu-test is now started
   info:    http://storni.last-jitsu-test.jit.su on Port 80
   info:    Nodejitsu ok

storni.last-jitsu-test.jit.su/items -> Works ok storni.last-jitsu-test.jit.su/items/new -> Displays the same error page as in Heroku deployment.

In this scenario, I've tested locally with vanilla

    node server.js
Javier
  • 31
  • 3
  • Would love to help you but all details I see here are Heroku based. Please drop by irc (#nodejitsu@freenode) if you need an interactive support session, else just rephrase you question so a Nodejitsu support engineer can actually help you (as opposed to, it also didnt work in nodejitsu) – dscape Dec 27 '12 at 23:57
  • Just updated with Nodejitsu related information. Thanks ! – Javier Dec 28 '12 at 00:21
  • From a Nodejitsu perspective the deployment worked flawlessly and the application is running. I recommend reaching out to the compoundjs team and find out why the application code is broken. – dscape Dec 28 '12 at 10:52
  • What version of compound on your heroku/nodejutsu installation? – Anatoliy Dec 28 '12 at 14:35
  • Solved in 1.1.4-2 Thanks. – Javier Dec 28 '12 at 16:43

0 Answers0