Open pmalek opened 11 years ago
I think I've seen the exact same error (node_modules/mongoose/lib/utils.js:413) triggered upon restarting the app per the book on page 15.
The book back on page 13 has a single extra space that, once removed, removed this error.
BOOK PAGE 13: var address = ' @dbh42.mongolab.com:27427/nockmarket';
I at first replicated that leading space (don't ask me why) for my own mongolab database URI, hit the error, got unhappy, then thought to come back and get rid of that space, and it worked.
CORRECTED (No Space): var address = '@dbh42.mongolab.com:27427/nockmarket';
Perhaps you never inserted that space into your code and something else is hitting the error ---
Best, William Reilly
I removed the space and checked. But it is not working for me.. Can anyone help me with this..
@snehawatharkar: Double check the version of mongoose you are running. I had the same issue and it turns out the tutorial I was following used a version "older than time itself". I updated the version in my package.json to version 4.6.0. ran the 'npm update' command in the app directory and it sorted my issue.
I am using Node 0.8.17 if that matters and while doing
npm install
in main directory ofchapter01
afternode app.js
I get this: