我正在与Meteor合作一款宾果游戏。我现在收到一个错误,因为它在JS文件中(我正在写咖啡),我不知道它来自哪里。
以下是完整错误:
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)
我已将咖啡和html文件放在一个要点: https://gist.github.com/ppedrazzi/5303493
感谢您的任何见解!!
答案 0 :(得分:12)
它看起来像bingo.coffee
的第334行。
在javascript中,所有内容都区分大小写,因此使用小写c
console.log "Server started and collections cleared."
而不是
Console.log "Server started and collections cleared."
可能会修复语法错误
答案 1 :(得分:0)
而不是这样写:
Console.log "Server started and collections cleared."
这样写:
console.log "Server started and collections cleared."
因为JavaScript是区分大小写的语言,所以总是用小写的“ c”写“ console”。