I'm reading this doc on hapi-auth-cookie and trying to run sample server.here is what i did :
1-putting sample server in server.js
2-npm init
3-node server.js
4-npm install --save hapi
5-node server.js but this time i get a new error
Error: Cannot find module '../'
somewhere in the code it's requiring '../'
server.register(require('../'), (err) => {
if (err) {
throw err;
}
But i don't understand this part really.you can see the full code in the link above.what should i do? thanks
I had the same error. I just deleted the node_modules directory and rerun install.
rm -rf node_modules/
npm install
After that the app runs correct again.
Maybe there isn't a index.js file in directory ../.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With