Open PatriciaBethBarker opened 9 years ago
Maybe. What's the error?
You have a mismatched punctuation--a missing brace or parentheses. In this case, it looks to me like you didn't correctly close the function call that starts on line 18.
replaced models/blog.js with post.js because I was getting confused. I dded moment in my post.js and this happened.
Okay, I don't think this is related to your models, though. It's an error after you added the hapi auth cookie plugin.
I have the async required int he db.js file. Should I move that to the index.js?
You shouldn't move it, but you may need to add it. You need to require async
into any module that uses it--just loading it in one file doesn't make it available in others.
Don't use the -g
flag, that means you're listing global packages. async
should be installed locally.
grrrrrrrrrrrrrr, so do I have to uninstall ?
No, not at all. You can check to see if it's installed locally with npm list --depth=0
, which will only show top-level packages in your directory.
Looks like you do need to install it locally. Don't forget to save it to your package: npm install async --save
.
OK I removed the hapi-auth-cookie...and its looking for it now...
Why remove it? Extraneous means that it is installed, but not saved to your package. It doesn't mean you don't need it.
it doesn't like my cookie secret. I am really frstrrated....
No, it doesn't like the dash that's at the start of the line. That's why it has a little ^
pointing to it from beneath.
Hates my code ;)
Well, it says "cannot add auth.scheme without a connection," so the logical answer is to move your server.connection()
call up to above the server.register
code.
I have an error I do not understand. Can you help?