weird app log error

31 views
Skip to first unread message

Vincenzo Lorenzale

unread,
Nov 28, 2015, 12:42:35 PM11/28/15
to Cloudnode

I am trying to run my app which apparently results running as I can see via dashboard but the log shows

a catastrofic error as though somethoing wrong was found in node_modules. During deployment I had the

following log where apparently the npm command could not be found on host. Can you clarify this issue?

Thanks, regards Vincenzo


remote: 4 files changed, 696 insertions(+), 432 deletions(-)
remote: create mode 100644 clientcloud.js
remote: delete mode 100644 index.js
remote: create mode 100644 server.js
remote: Updating npm modules...
remote: /data/app/vinloren/1969-0b63906a4bf22a51ec69c7b7b12bad51/home
remote: hooks/post-receive: line 37: npm: command not found
remote:
remote: ==== Compiling cloudtravel...
remote: ==== Restarting your app: cloudtravel
remote: ==== App restarted
remote: ==== App successfully deployed to http://cloudtravel.cloudno.de
remote:
remote: Finished.
remote:
To https://git.cloudno.de/git/vinloren/1969-0b63906a4bf22a51ec69c7b7b12bad51.git
72644d3..bff070a master -> master



Application Log

>>>
28 Nov 17:07:20 - Inside Node Virtual Machine
28 Nov 17:07:20 - Version: v5.0.0
28 Nov 17:07:20 - Owning user: node
28 Nov 17:07:20 - User ID: 1010
28 Nov 17:07:20 - Setting up sandbox..
28 Nov 17:07:20 - Munging require paths..
28 Nov 17:07:20 - Globalizing Buffer
28 Nov 17:07:20 - Reading startup file server.js...
28 Nov 17:07:20 - Final user check: 1010
28 Nov 17:07:20 - Node Virtual Machine started (17027) at Sat Nov 28 2015 17:07:20 GMT+0000 (UTC)
<<<

SyntaxError: Unexpected token ILLEGAL
   at Object.exports.runInNewContext (vm.js:48:16)
   at /root/node_modules/launchlib.js:266:16
   at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:404:3)
SyntaxError: Unexpected token ILLEGAL
   at Object.exports.runInNewContext (vm.js:48:16)
   at /root/node_modules/launchlib.js:266:16
   at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:404:3)[SyntaxError: Unexpected token ILLEGAL]

Hans Schroeder

unread,
Nov 28, 2015, 1:10:14 PM11/28/15
to Cloudnode
I'll check for the npm error. The error from the application log mean, that there are non-js tokens in your server.js file.

- Hans

Hans Schroeder

unread,
Nov 28, 2015, 1:26:37 PM11/28/15
to Cloudnode
You are right, I tried one of my apps and I am getting the same npm error. Which is strange because it is installed.

Vincenzo Lorenzale

unread,
Nov 28, 2015, 1:30:57 PM11/28/15
to Cloudnode
Hi Hans, thanks for the answer, I corrected the server.js file getting rid of the first line #!/bin/env node and now the app log is clean:

28 Nov 18:20:31 - Inside Node Virtual Machine
28 Nov 18:20:31 - Version: v5.0.0
28 Nov 18:20:31 - Owning user: node
28 Nov 18:20:31 - User ID: 1010
28 Nov 18:20:31 - Setting up sandbox..
28 Nov 18:20:31 - Munging require paths..
28 Nov 18:20:31 - Globalizing Buffer
28 Nov 18:20:31 - Reading startup file server.js...
28 Nov 18:20:31 - Final user check: 1010
28 Nov 18:20:31 - Node Virtual Machine started (17446) at Sat Nov 28 2015 18:20:31 GMT+0000 (UTC)
<<<

28 Nov 18:20:32 - [INFO] You asked to listen on port: 8080, but cloudnode will use port: 9969 instead..
28 Nov 18:20:32 - Inizio log at 0
28 Nov 18:20:32 - DB travel aperto.

yet the npm "error" is still there in deployment:

remote: Updating npm modules...
remote: /data/app/vinloren/1969-0b63906a4bf22a51ec69c7b7b12bad51/home
remote: hooks/post-receive: line 37: npm: command not found

Hans Schroeder

unread,
Nov 28, 2015, 2:03:32 PM11/28/15
to Cloudnode
It was a path issue. For me it is working again.

- Hans
Reply all
Reply to author
Forward
0 new messages