node-ticket-manager icon indicating copy to clipboard operation
node-ticket-manager copied to clipboard

package.json issues with just me ?

Open macatadobe opened this issue 11 years ago • 3 comments

i am able to run the ticket manager locally on my machine using npm start . However i tried to install it on openshift.com and it is not starting .. On searching internet i found that the start commands should be part of package.json and npm start is not part of start tag in package.json . The error on server states : DEBUG: Running node-supervisor with DEBUG: program 'lib/index' DEBUG: --watch '/var/lib/openshift/549c15254382ec58f0000070/app-root/data/.nodewatch' DEBUG: --ignore 'undefined' DEBUG: --extensions 'node|js|coffee' DEBUG: --exec 'node' DEBUG: Starting child process with 'node lib/index' DEBUG: Watching directory '/var/lib/openshift/549c15254382ec58f0000070/app-root/data/.nodewatch' for changes. DEBUG: Program node lib/index exited with code 0 DEBUG: Starting child process with 'node lib/index' DEBUG: Program node lib/index exited with code 0 DEBUG: Starting child process with 'node lib/index'

These last commands are reperting and server is not starting .

DO i need to make few changes before i can run it easily on some server for free . In case you have some server instances where u ran it without change for free can u guide me .

macatadobe avatar Dec 25 '14 15:12 macatadobe

Hi macatadobe

short answer: try run node lib/server.js on openshift.com

I haven't used openshift, but from your debug log, I guess the problem might caused by Running node-supervisor with.

Here is the content of npm start: https://github.com/yi/node-ticket-manager/blob/master/package.json#L30

The npm start use nodemon to monitor code change and restart the app everytime code changed. nodemon seems to have same function as node-supervisor, so I guess there might be some conflicts.

And we use npm start only for development. When you deploy to production enviorment, there is no point to use the dev mode. So just run the app by call node lib/server.js

yi avatar Dec 27 '14 07:12 yi

HI yi ,

The openshift requests users to NOT run commands on the server as it violates its authorization etc . Anything which is written in package.json 's main and start tags etc would be run automatically . Users of openshift are allowed to give it a git path from where it can download code and openshift uses the downloaded code and run its package .json

What is the use of "main": "lib/index" ?

When i ran the command you suggested i get the following error

[rd-feedbk.rhcloud.com repo]> node lib/server.js Failed to load c++ bson extension, using pure JS version

Failed to load c++ bson extension, using pure JS version

[express::main] pathToView:/var/lib/openshift/549c15254382ec58f0000070/app-root/runtime/repo/views connect.multipart() will be removed in connect 3.0 visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives connect.limit() will be removed in connect 3.0

events.js:72 throw er; // Unhandled 'error' event ^ Error: listen EACCES at errnoException (net.js:901:11) at Server._listen2 (net.js:1020:19) at listen (net.js:1061:10) at Server.listen (net.js:1135:5) at Function.app.listen (/var/lib/openshift/549c15254382ec58f0000070/app-root/runtime/repo/node_modules/express/lib/application.js:533:24) at Object. (/var/lib/openshift/549c15254382ec58f0000070/app-root/runtime/repo/lib/server.js:73:7) at Object. (/var/lib/openshift/549c15254382ec58f0000070/app-root/runtime/repo/lib/server.js:79:4) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)

macatadobe avatar Dec 28 '14 06:12 macatadobe

hi macatadobe

The openshift requests users to NOT run commands on the server as it violates its authorization etc . Anything which is written in package.json 's main and start tags etc would be run automatically .

fork the ticketman repo, and change package.json (line 30):

"start": "node lib/server.js",

[rd-feedbk.rhcloud.com repo]> node lib/server.js Failed to load c++ bson extension, using pure JS version

bson is the default data format used by mongodb. It seems binary compilation of bson extension failed on your server

Error: listen EACCES

It error is casued by either "port is used" or "lack of access right"

yi avatar Jan 06 '15 04:01 yi