ryanmurakami/pizza-luvrs

Error: Cannot find module '@hapi/hapi

Closed this issue · 2 comments

I faced with error of "npm start" on both EC2 or my local (win) machine.

Full output:
`c:\Git\pizza-luvrs>npm start

pizza-luvrs@1.0.0 start c:\Git\pizza-luvrs
node index.js

internal/modules/cjs/loader.js:960
throw err;
^

Error: Cannot find module '@hapi/hapi'
Require stack:

  • c:\Git\pizza-luvrs\index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object. (c:\Git\pizza-luvrs\index.js:1:14)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ 'c:\Git\pizza-luvrs\index.js' ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! pizza-luvrs@1.0.0 start: node index.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the pizza-luvrs@1.0.0 start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:`

Actually this fix helps:
"npm init" and then install "npm install hapi --save".

Glad you figured it out!