Question

I have a strange problem with the Geddy and Mongo under Windows. I'm completely new with Node.js and all this stuff, and try their sample app, which was fine until mongo attached. Then it throw something like this on data save:

c:\www\__node\wartex\node_modules\mongodb-wrapper\node_modules\mongodb\lib\mongo
db\connection\server.js:359
        throw err;
              ^
ReferenceError: model is not defined
    at utils.mixin.insert.insert (C:\Users\Alex\AppData\Roaming\npm\node_modules
\geddy\node_modules\model\lib\adapters\mongo\index.js:309:29)
    at utils.mixin.insert.insert (C:\Users\Alex\AppData\Roaming\npm\node_modules
\geddy\node_modules\model\lib\adapters\mongo\index.js:304:13)
    at exports.Collection.self.insert (c:\www\__node\wartex\node_modules\mongodb
-wrapper\lib\mongodb-wrapper.js:303:17)
    at insertAll (c:\www\__node\wartex\node_modules\mongodb-wrapper\node_modules
\mongodb\lib\mongodb\collection.js:315:12)
    at Collection.insert (c:\www\__node\wartex\node_modules\mongodb-wrapper\node
_modules\mongodb\lib\mongodb\collection.js:90:3)
    at exports.Collection.self.insert (c:\www\__node\wartex\node_modules\mongodb
-wrapper\lib\mongodb-wrapper.js:301:24)
    at exports.Collection.self.ensureIndex.cb (c:\www\__node\wartex\node_modules
\mongodb-wrapper\lib\mongodb-wrapper.js:201:17)
    at Db.collection (c:\www\__node\wartex\node_modules\mongodb-wrapper\node_mod
ules\mongodb\lib\mongodb\db.js:449:44)
    at EventEmitter.exports.Collection.self.ensureIndex.cb (c:\www\__node\wartex
\node_modules\mongodb-wrapper\lib\mongodb-wrapper.js:193:16)
    at EventEmitter.emit (events.js:99:17)
[Tue, 30 Oct 2012 22:05:21 GMT] ERROR Worker 10576 died.

which is not too cool. It crashes on every save (create or update), still it create data and it is available for read after re-run geddy app. Delete works just fine too.

How this could be fixed?


Also, as a side question, maybe it is some better node.js framework, which have better documentation and crash reports, and shouldn't be re-run manually after each unexpected error?

Était-ce utile?

La solution

Looks like you were one of the few people who were affected by the recent model bug. If you reinstall Geddy you should be good to go.

$ npm install -g geddy

Also, as far as your side question goes, I'm sorry that you've had some problems - have you tried asking your questions on the geddy mailing list? And if you haven't seen the documentation for Geddy yet, you can check them out here: http://geddyjs.org/documentation

If you find anything missing, feel free to open an issue on github.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top