Persistent Syntax Error

15 views
Skip to first unread message

MathWizz

unread,
Aug 31, 2012, 10:58:25 AM8/31/12
to clou...@googlegroups.com
 Hi, last night I pushed an update, but the server never came back up after it restarted. The reason for this was that I had apparently had a syntax error somewhere. The tokens in the error did not even exit in my code. I tried reverting to a previous version and removing all of the contents of the file, but to no avail. I have to conclude this is some kind clodenode bug. The app is http://scratchchat.cloudeno.de and this is the log:

31 Aug 16:28:18 - Inside Node Virtual Machine
31 Aug 16:28:18 - Version: v0.6.17
31 Aug 16:28:18 - Owning user: 501
31 Aug 16:28:18 - User Changed: 501
31 Aug 16:28:18 - Checking for /etc
31 Aug 16:28:18 - Update /etc/resolve.conf with Googles DNS servers..
31 Aug 16:28:18 - Checking for /tmp
31 Aug 16:28:18 - Checking for /mnt
31 Aug 16:28:18 - Setting up sandbox..
31 Aug 16:28:18 - Munging require paths..
31 Aug 16:28:18 - Globalizing Buffer
31 Aug 16:28:18 - Reading startup file server.js...
31 Aug 16:28:18 - Final user check: 501
31 Aug 16:28:18 - Cloudnode wrapped script starting (5313) at Fri Aug 31 2012 16:28:18 GMT+0200 (UTC)
SyntaxError: Unexpected token <<
   at /var/cloudnode/nodester/scripts/launch_app_06.js:249:12
   at [object Object].<anonymous> (fs.js:123:5)
   at [object Object].emit (events.js:64:17)
   at Object.oncomplete (fs.js:1187:12)[SyntaxError: Unexpected token <<]

Hans Schroeder

unread,
Sep 1, 2012, 12:52:04 PM9/1/12
to clou...@googlegroups.com
Hi Matt,

The error is that there is the token << in your code. It seems to be a merge conflict marker:

    274 <<<<<<< HEAD:server.js
    275                                                                 for (var user in allUsers) {
    276                                                                         if (allUsers[user].id === id) {
    277 =======
    278                                                                 for (var u in allUsers) {
    279                                                                         if (allUsers[u].id === id) {
    280 >>>>>>> 49fe8a7600730b3ebc6a6c849d0d39c5af2c77b5:server.js

Try to push a clean version to make your app running again.

-- Hans 

MathWizz

unread,
Sep 3, 2012, 11:54:57 PM9/3/12
to clou...@googlegroups.com
That is what I assumed at first, but there is no conflict at all. I tried pushing a clean version anyway, but the log it the same, line number and all.

Hans Schroeder

unread,
Sep 4, 2012, 2:44:42 AM9/4/12
to clou...@googlegroups.com
Hi Matt,

I resolved the conflict on your VM:

$ git status
server.js: needs merge
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 1 different commit(s) each, respectively.
#
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
# unmerged:   server.js
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# .nodester/
# error.log
# etc/
# node_modules/
no changes added to commit (use "git add" and/or "git commit -a")

$ git reset --hard     
HEAD is now at 31d82ac update

$ git pull origin master
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /git/MathWizz/1104-<..>/.
 * branch            master     -> FETCH_HEAD
Auto-merged server.js
Merge made by recursive.
 server.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

-- Hans
Reply all
Reply to author
Forward
0 new messages