NPM - Error: Cannot find module '../'

Viewed 12859

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

4 Answers
Related