Bug 1020465

Summary: Error: Cannot find module 'express' using node.js cartridge
Product: OpenShift Container Platform Reporter: Jeremy Eder <jeder>
Component: ContainersAssignee: Jason DeTiberus <jdetiber>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 2.0.0CC: gpei, jdetiber, jialiu, libra-onpremise-devel, perfbz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-16 09:10:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Comment 2 Jason DeTiberus 2013-10-17 22:39:58 UTC
This should be fixed in the latest puddle: http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/2.0/2013-10-17.1/

Comment 3 Johnny Liu 2013-10-22 10:57:33 UTC
Verified this bug with 2.0/2013-10-21.3, and PASS

After create nodejs app, log into gear, its log show that, it is working fine.
> cat nodejs/logs/node.log 
Tue Oct 22 2013 03:45:12 GMT-0700 (MST): Starting application 'nodejsapp' ...

DEBUG: Running node-supervisor with
DEBUG:   program 'server.js'
DEBUG:   --watch '.'
DEBUG:   --ignore 'undefined'
DEBUG:   --extensions 'node|js|coffee'
DEBUG:   --exec 'node'

DEBUG: Starting child process with 'node server.js'
DEBUG: Watching directory '/var/lib/openshift/5266572358560a4c8b000006/app-deployments/2013-10-22_03-44-59.652/repo' for changes.
Warning: express.createServer() is deprecated, express
applications no longer inherit from http.Server,
please use:

  var express = require("express");
  var app = express();

Tue Oct 22 2013 03:45:13 GMT-0700 (MST): Node server started on 127.2.17.129:8080 ...

Comment 4 Johnny Liu 2013-10-29 08:46:20 UTC
This issue reproduced with 2.0/2013-10-23.2 puddle, so I move it to "ASSGINED" status.

Comment 5 Gaoyun Pei 2013-11-06 06:52:36 UTC
Found this issue is verified on puddle 2.0/2.0/2013-11-05.1  with openshift-origin-cartridge-nodejs-1.18.0-1.git.60.c69c813.el6op.noarch

Comment 6 Gaoyun Pei 2013-11-07 06:28:53 UTC
This bug is verified on puddle 2.0/2013-11-05.1, after nodejs-0.10 app is created, check its log:
Wed Nov 06 2013 20:24:07 GMT-0700 (MST): Starting application 'app1' ...

DEBUG: Running node-supervisor with
DEBUG:   program 'server.js'
DEBUG:   --watch '.'
DEBUG:   --ignore 'undefined'
DEBUG:   --extensions 'node|js|coffee'
DEBUG:   --exec 'node'

DEBUG: Starting child process with 'node server.js'
DEBUG: Watching directory '/var/lib/openshift/527b07c5ab65461ee400001d/app-root/runtime/repo' for changes.
Warning: express.createServer() is deprecated, express
applications no longer inherit from http.Server,
please use:

  var express = require("express");
  var app = express();

Wed Nov 06 2013 20:24:07 GMT-0700 (MST): Node server started on 127.1.249.129:8080 ...

No errors.