Thursday, 11 May 2017

nodejs app shuts down on an error

I am running a nodejs app on local machine and I get Here is the error log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle visualapp@1.0.0~prestart: visualapp@1.0.0
6 silly lifecycle visualapp@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle visualapp@1.0.0~start: visualapp@1.0.0
8 verbose lifecycle visualapp@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle visualapp@1.0.0~start: PATH: /usr/share/npm/bin/node-gyp-bin:/home/martiner/www/visualizationApp/NODEJS/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/martiner/.local/bin:/home/martiner/.local/bin
10 verbose lifecycle visualapp@1.0.0~start: CWD: /home/martiner/www/visualizationApp/NODEJS
11 silly lifecycle visualapp@1.0.0~start: Args: [ '-c', 'nodejs hello.js' ]
12 silly lifecycle visualapp@1.0.0~start: Returned: code: 1  signal: null
13 info lifecycle visualapp@1.0.0~start: Failed to exec start script
14 verbose stack Error: visualapp@1.0.0 start: `nodejs hello.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:821:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid visualapp@1.0.0
16 verbose cwd /home/martiner/www/visualizationApp/NODEJS
17 error Linux 4.4.0-75-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
19 error node v4.2.6
20 error npm  v3.5.2
21 error code ELIFECYCLE
22 error visualapp@1.0.0 start: `nodejs hello.js`
22 error Exit status 1
23 error Failed at the visualapp@1.0.0 start script 'nodejs hello.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the visualapp package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     nodejs hello.js
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs visualapp
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls visualapp
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

and I get the following error in the console:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at exports._errnoException (util.js:870:11)
    at TLSWrap.onread (net.js:544:26)

I have gone through the code several times, and can't figure out where the problem is coming from. Could somebody help me solve this?



via jacky

No comments:

Post a Comment