Search code examples
node.jsmongodbmongoskin

mongoskin causing node to crash - "Cannot read property 'name' of undefined"


I'm trying to learn to use Node.js, aswell as Express.js, Angular.js and MongoDB by following a tutorial, since this would be my first time dabbling with these technologies.

Everything worked perfectly up until the point where I had to test the JSON Objects. (On the end of Step 2: Creating an API with Express). For some reason, the browser won't connect at all, and on my command line, I get an error that says nodemon app crashed - waiting for file changes before starting. Could that be related?

I'm sorry for how ambiguous the question is, but I'll gladly answer any questions needed in order to get this to work.

Massive thanks in advance

error


Solution

  • This seems to be a problem with mongoskin module and not your code. Check the versions of your dependencies by running npm version. And try uninstalling and reinstalling mongoskin with

    npm uninstall mongoskin --save
    npm install [email protected] --save
    

    per suggestions here.