howdyai / botkit-storage-mongo

A MongoDB storage driver for Botkit
MIT License
54 stars 42 forks source link

TypeError: Cannot read property 'name' of undefined at makeSkinClass #12

Closed hrfischberg closed 8 years ago

hrfischberg commented 8 years ago

When I run the program with mongodb storage adaptor, I get this error. Does anyone have any suggestions or run into this issue? @anonrig

/Users/HFischberg/internship/ichimaster/node_modules/monk/node_modules/mongoskin/lib/utils.js:33
  var skinClassName = 'Skin' + NativeClass.name;
                                          ^

TypeError: Cannot read property 'name' of undefined
    at makeSkinClass (/Users/HFischberg/internship/ichimaster/node_modules/monk/node_modules/mongoskin/lib/utils.js:33:43)
    at Object.<anonymous> (/Users/HFischberg/internship/ichimaster/node_modules/monk/node_modules/mongoskin/lib/grid.js:6:35)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/HFischberg/internship/ichimaster/node_modules/monk/node_modules/mongoskin/lib/db.js:22:16)
anonrig commented 8 years ago

The problem exists on monk package. Unfortunately, it is not Botkit related.

koizuss commented 8 years ago

I solved this problem by updating mongodb to 1.4.40

npm uninstall mongodb --save
npm install mongodb@1.4 --save

@see https://github.com/Automattic/monk/issues/91

anonrig commented 8 years ago

Thanks for the update! mongodb isn't included to this project but monk does.

hrfischberg commented 8 years ago

Thanks :)