scotch-io/mean-machine-code

Chapter 9 - TypeError: object is not a function

Closed this issue · 5 comments

Have worked through to this point with no problems. I have checked my code against this repo and it match but I have getting the following error:

TypeError: object is not a function

screen shot 2015-04-11 at 2 58 41 pm

This is refering to this line of code:

var user = new User();

Any help would be much appreciated. Thanks for the great book by the way.

James

Anyone??

Post your code, not the screen shot. I have not read upto chapt 9 but someone will help if you post the code. And check if there is any issue with case-sensitive.

I just pulled down the code and it seems to be working fine for me:

Double check to make sure that all your Mongoose models are correct. Passing objects around the various Node files with module.exports, can be tricky with the syntax. This is essentially saying that you are trying to call a function or object incorrectly.

And yes, a link to a code repo helps.

OK I will take a look. Thanks for the reply.

Was a typo on my side. Sorry.