"npm run web-dev" fails with cannot find module error
Here is the ssh ouput within the virtualbox from the vagrant starter project:
root@vagrant-ubuntu-trusty-64:/home/vagrant/project# npm run web-dev
my-llllllllllllll@0.1.0 web-dev /home/vagrant/project nodemon --harmony -e js,json,css,hbs web.js
12 Sep 08:22:42 - [nodemon] virtual machine clock offset: 00h00m24s
12 Sep 08:22:42 - [nodemon] v1.4.1
12 Sep 08:22:42 - [nodemon] to restart at any time, enter rs
12 Sep 08:22:42 - [nodemon] watching: .
12 Sep 08:22:42 - [nodemon] starting node --harmony web.js
module.js:338
throw err;
^
Error: Cannot find module 'ac-koa'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/vagrant/project/web.js:1:73)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
12 Sep 08:22:42 - [nodemon] app crashed - waiting for file changes before starting...
Comments (6)
-
Account Deactivated -
Here is the npm-debug after running npm install, npm run web from a directory cloned with ac-koa-hipchat-greeter, not from the virtualbox.
0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'web' ] 2 info using npm@2.5.1 3 info using node@v0.12.0 4 verbose node symlink C:\Program Files\nodejs\\node.exe 5 verbose run-script [ 'preweb', 'web', 'postweb' ] 6 info preweb ac-koa-hipchat-greeter@0.1.0 7 info web ac-koa-hipchat-greeter@0.1.0 8 verbose unsafe-perm in lifecycle true 9 info ac-koa-hipchat-greeter@0.1.0 Failed to exec web script 10 verbose stack Error: ac-koa-hipchat-greeter@0.1.0 web: `node --harmony web.js` 10 verbose stack Exit status 1 10 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16) 10 verbose stack at EventEmitter.emit (events.js:110:17) 10 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:14:12) 10 verbose stack at ChildProcess.emit (events.js:110:17) 10 verbose stack at maybeClose (child_process.js:1008:16) 10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1080:5) 11 verbose pkgid ac-koa-hipchat-greeter@0.1.0 12 verbose cwd C:\Users\bond\Desktop\hipchat\ac-koa-hipchat-greeter 13 error Windows_NT 6.1.7601 14 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "web" 15 error node v0.12.0 16 error npm v2.5.1 17 error code ELIFECYCLE 18 error ac-koa-hipchat-greeter@0.1.0 web: `node --harmony web.js` 18 error Exit status 1 19 error Failed at the ac-koa-hipchat-greeter@0.1.0 web script 'node --harmony web.js'. 19 error This is most likely a problem with the ac-koa-hipchat-greeter package, 19 error not with npm itself. 19 error Tell the author that this fails on your system: 19 error node --harmony web.js 19 error You can get their info via: 19 error npm owner ls ac-koa-hipchat-greeter 19 error There is likely additional logging output above. 20 verbose exit [ 1, true ]
-
- attached npm-debug.log
-
I'm sorry, I was wearing my dumb hat that day: The directory was empty. The cloned vm does work, I just needed to install ac-koa, then run npm run web-dev. Please close this ticket.
-
Account Deactivated Ok, thanks for the update!
-
Account Deactivated - changed status to resolved
- Log in to comment
I'll try to diagnose and repair the vagrant bootstrap as soon as possible, but in the meantime, you can try running
npm install
from the project directory -- it looks like the module dependencies didn't get installed properly during the VM initialization. If that fails, please attach the resulting npm-debug.log to this issue.