Вот мой код в CoffeeScript для простого теста с MongoDB.
Когда я бегу
coffee -c UserDataProvider.coffee
Я получаю сообщение об ошибке UNCLOSED INDENT ON LINE 6
Это мой код:
Db = require('mongodb/db').Db
ObjectID = require('mongodb/bson/bson').ObjectID
Server = require('mongodb/connection').Server
class UserDataProvider
constructor = (host,port)->
this.db = new Db( 'test' , new Server(host ,port,{}))
getCollection = (callback) ->
this.db.collection('data',(error,data)->
if error then callback(error)
else callback(data)
StackTrace - это:
Error: In UserDataProvider.coffee, unclosed INDENT on line 6
at Error (unknown source)
at Rewriter.ensureBalance (/usr/local/lib/node/.npm/coffee-script/1.0.1/package/lib/rewriter.js:283:17)
at Rewriter.rewrite (/usr/local/lib/node/.npm/coffee-script/1.0.1/package/lib/rewriter.js:21:12)
at Lexer.tokenize (/usr/local/lib/node/.npm/coffee-script/1.0.1/package/lib/lexer.js:37:29)
at Object.compile (/usr/local/lib/node/.npm/coffee-script/1.0.1/package/lib/coffee-script.js:26:34)
at /usr/local/lib/node/.npm/coffee-script/1.0.1/package/lib/command.js:117:33
at /usr/local/lib/node/.npm/coffee-script/1.0.1/package/lib/command.js:85:26
at [object Object].<anonymous> (fs.js:86:5)
at [object Object].emit (events.js:39:17)
at afterRead (fs.js:843:12)
Может кто-нибудь помочь?