Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find module 'hapi' #1

Closed
smnplk opened this issue Oct 17, 2014 · 2 comments
Closed

Can't find module 'hapi' #1

smnplk opened this issue Oct 17, 2014 · 2 comments

Comments

@smnplk
Copy link

smnplk commented Oct 17, 2014

When I try to run my first completed challenge "makemehapi run program.js" I get this error.
But I installed hapi with 'npm install hapi -g'

module.js:340
throw err;
^
Error: Cannot find module 'hapi'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/smnplk/playground/nodejs/hapiapp/program.js:1:74)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
✗ Error connecting to http://localhost:56797: ECONNREFUSED

Error: connect ECONNREFUSED
at errnoException (net.js:901:11)
at Object.afterConnect as oncomplete

@smnplk
Copy link
Author

smnplk commented Oct 17, 2014

So I had to create package.json with "npm init" and then install "npm install hapi --save".

@smnplk smnplk closed this as completed Oct 17, 2014
@nelsonic
Copy link
Member

Hi! This is more an issue for: https://github.com/hapijs/makemehapi
Glad you figured it out. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants