Jumpstart node.js / please check code!

hello,
please can someone check the code in this book (chapter1) (maybe the author?, unfortunately the discussionsection is deactivated (like all other comment- and discussionsections)) !!

i think, i have done all i can as a beginner to correct this “flaw”.
(checked tentimes of typos, checked the mongolab things, tried to update,upgrade, tried the originalcode
on the githubsite(yes, of course with my corrected credentials;), read and tried all things here in forum,…)

its all but frustrating.
IMHO, sitepoint should take responsibilities for such situations, also because its not a free book, i payed
for it.

it could be no great affair, to reinstall discussion and comments, so inconsistencies of deprecated code or
whatever could be easily corrected.

thank you

ERROR:
"$ node app
Express server listening on port 3000 in development mode
C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongoose\lib\utils.js:413
throw err;
^

Error: Unhandled “error” event. (not authorized for query on nockmarket.system.indexes)
at NativeConnection.emit (events.js:186:19)
at C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongoose\lib\model.js:554:31
at C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongoose\lib\utils.js:408:16
at C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongodb\lib\mongodb\db.js:1066:28
at C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongodb\lib\mongodb\db.js:1200:28
at C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongodb\lib\mongodb\cursor.js:124:30
at C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongodb\lib\mongodb\cursor.js:166:32
at C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongodb\lib\mongodb\cursor.js:441:39
at Cursor.close (C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongodb\lib\mongodb\cursor.js:687:5)
at CallbackStore.commandHandler (C:\Users\Gerhard\OneDrive\Documents\NODE\book_jumpstartnode\NODEJS1-master\chapter01\authentication\node_modules\mongodb\lib\mongodb\cursor.js:441:21)"

Hi,

Sorry that you’re having issues with the book.

Just to check I got it right, is this the book you’re refering to?

yes, it is this book
(Jump Start Node.js)

Sorry to have to tell you this, but that book is six years old and that is an age in software development. If you really want, I could attempt to help you to get the first example running, but it would be much better to find an up-to-date book/course/tutorial to work with.

Here is one I wrote recently, that might be of use:

2 Likes

thanks for your reply,
for sure its better to use another book.
nevertheless i think its not nice, expressed mildly, to trick a beginner with an outdated
book on a learningplatform.
I invested time and effort, only to learn there is no solution.
At least there can be offered help.
(maybe with a working comment/discussionsection;)

Greetings

Ok, point taken.

I’ll pass your comments on to the person in charge of books, see what he has to say.

Edit: I just saw he’s on vacation. Might take a while for him to reply.

1 Like

I have a habit of noticing dates. For example, seeing “Published Date November 2012” I would know that the material has a good chance of having problems that I would need to solve and that the material might be better for “historical” knowledge than current best practice. I might still have interest in the material, but I would need to be willing to accept any shortcomings I might encounter with it.

That said, if the material has since been superseded with something more recent (eg. this is edition 3, the current edition is 4) having that information displayed more prominently would help those that don’t have my habit of noticing dates or might not be aware of how fast technology changes.

1 Like

Ok, so what exactly are you trying? Where in the book are you? How can we reproduce the error you are having?

Hi nepo, I’m sorry that you’re having issues. Unfortunately, this book is really quite old now. At some point in the future, we may update it and publish a second edition.

With regard to your point about the discussion section, yes I agree. We’re currently looking at redisgning the book’s pages on SP Premium, including a more coprehensive commenting/discussion section. I don’t have a timeframe for that at the moment unfortunately.

@Mittineague, yes, that’s a good point. When we publish a new edition of a book we generally update the older edition’s copy to point to the new one, but in this case there is no newer edition. However, there is https://www.sitepoint.com/premium/books/your-first-week-with-node-js, which while not a 1-for-1 replacement would definitely be a better option now. I’ll have a chat with HQ about that.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.