mongo-migrate icon indicating copy to clipboard operation
mongo-migrate copied to clipboard

Cannot read property 'raw' of undefined

Open Vadorequest opened this issue 10 years ago • 1 comments

TypeError: Cannot read property 'raw' of undefined
    at null.<anonymous> (C:\wamp\www\Ayolan-Translation\node_modules\mongodb\lib\mongodb\connection\server.js:443:77)
    at EventEmitter.emit (events.js:95:17)
    at null.<anonymous> (C:\wamp\www\Ayolan-Translation\node_modules\mongodb\lib\mongodb\connection\connection_pool.js:191:13)
    at EventEmitter.emit (events.js:98:17)
    at Socket.<anonymous> (C:\wamp\www\Ayolan-Translation\node_modules\mongodb\lib\mongodb\connection\connection.js:457:22)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)
    at Socket.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:408:10)
    at emitReadable (_stream_readable.js:404:5)

I ran:

node node_modules/mongo-migrate -cfg config/custom/mongodb.json -dbn development -runmm

My application can connect to the mongo db without any problem.

{
    "development": {
        "host" : "127.0.0.1",
        "port" : "3306",
        "database" : "xxx",
        "db" : "xxx",
        "user" : "",
        "password" : ""
    },

    "production": {
        "host" : "127.0.0.1",
        "port" : "3306",
        "database" : "yyy",
        "db" : "yyy",
        "user" : "",
        "password" : ""
    }
}

Vadorequest avatar Feb 06 '14 21:02 Vadorequest

Resolved:

As I thought, that was because of the configuration file. Bad, I cant use the same object.

"development-migrate": {
        "host" : "127.0.0.1",
        "db" : "xxx"
    },

Vadorequest avatar Feb 06 '14 21:02 Vadorequest