How to see node errors?
You can still read and search them, but for help, please post a question on Stack Overflow.
I am having difficulty in getting my node app to run.
In ~/nodejs-0.6/logs/node.log I am seeing this:
npm ERR! node -v v0.6.20 npm ERR! npm -v 1.1.37 npm ERR! code ELIFECYCLE npm ERR! message firstname.lastname@example.org start: `node server.js` npm ERR! message `sh "-c" "node server.js"` failed with 1 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /var/lib/openshift/514fbb775004466ff5000005/app-root/runtime/repo/npm-debug.log npm ERR! not ok code undefined npm ERR! not ok code 1
The npm-debug.log isn't much better:
16 error Failed at the email@example.com start script. 16 error This is most likely a problem with the application-name package, 16 error not with npm itself. 16 error Tell the author that this fails on your system: 16 error node server.js 16 error You can get their info via: 16 error npm owner ls application-name 16 error There is likely additional logging output above. 17 error System Linux 2.6.32-358.2.1.el6.x86_64 18 error command "node" "/usr/bin/npm" "start" "-d" 19 error cwd /var/lib/openshift/514fbb775004466ff5000005/app-root/runtime/repo 20 error node -v v0.6.20 21 error npm -v 1.1.37 22 error code ELIFECYCLE 23 error message firstname.lastname@example.org start: `node server.js` 23 error message `sh "-c" "node server.js"` failed with 1 24 verbose exit [ 1, true ]
How can I see the real error? I also tried:
node server.js -e production
It first bombed because my environment variables were not set for some reason (I use node.env) but when I manually set them in bash I get this:
events.js:48 throw arguments; // Unhandled 'error' event ^ Error: listen EACCES at errnoException (net.js:670:11) at Array.0 (net.js:756:28) at EventEmitter._tickCallback (node.js:190:38)
This looks like actually node output but I don't understand why it differs from node.log.
I am having trouble tracking down the real cause of the problem. Only thing I know to do is to comment out my code line by line but this isn't really feasible.
Thanks in advance.