Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReferenceError: Console is not defined

Tags:

meteor

I am working on a bingo game with Meteor. I am now getting an error and since it is in the JS file (and I am writing Coffee), I have no idea where it's coming from.

Here is the full error:

ReferenceError: Console is not defined
    at app/Bingo.coffee.js:465:12
    at run (/Users/ppedrazzi/Dropbox/Paul's Stuff/MyApps/Meteor/bingo/.meteor/local/build/server/server.js:283:63)
    at Array.forEach (native)
    at Function._.each._.forEach (/usr/local/meteor/lib/node_modules/underscore/underscore.js:79:11)
    at run (/Users/ppedrazzi/Dropbox/Paul's Stuff/MyApps/Meteor/bingo/.meteor/local/build/server/server.js:283:7)

I have placed the coffee and html file in a gist here: https://gist.github.com/ppedrazzi/5303493

Thank you for any insight!!

like image 617
ppedrazzi Avatar asked Apr 03 '13 17:04

ppedrazzi


2 Answers

Instead of writing this:

Console.log "Server started and collections cleared."

Write it like this:

console.log "Server started and collections cleared."

Always write 'console' with a lowercase 'c' because JavaScript is a case sensitive language.

like image 117
Naik prasad Avatar answered Nov 19 '22 20:11

Naik prasad


It looks like line 334 of your bingo.coffee.

In javascript everything is case sensitive so using a lowercase c

console.log "Server started and collections cleared."

instead of

Console.log "Server started and collections cleared."

is likely to fix the syntax error

like image 32
Tarang Avatar answered Nov 19 '22 22:11

Tarang