can not run npm start -error cannot run module routes/users when I have the file there

Leo Tyndall
Leo Tyndall used Ask the Experts™
on
I am trying to setup Mongoose and when I run NPM start I get the following error


Error: Cannot find module '.routes/users'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/leotyndall/Desktop/node/nodeexpress/nodewebapp/app.js:12:13)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/leotyndall/Desktop/node/nodeexpress/nodewebapp/bin/www:7:11)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodewebapp@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodewebapp@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

i do have a folder with the routes/ see the file uploaded

I am lost why it wont run
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
here is the log file

/Users/leotyndall/.npm/_logs/2018-05-12T09_23_26_002Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@5.6.0
3 info using node@v8.11.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle nodewebapp@0.0.0~prestart: nodewebapp@0.0.0
6 info lifecycle nodewebapp@0.0.0~start: nodewebapp@0.0.0
7 verbose lifecycle nodewebapp@0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle nodewebapp@0.0.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/leotyndall/Desktop/node/nodeexpress/nodewebapp/node_modules/.bin:/Users/leotyndall/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/leotyndall/.rvm/bin:/usr/local/mondodb/bin
9 verbose lifecycle nodewebapp@0.0.0~start: CWD: /Users/leotyndall/Desktop/node/nodeexpress/nodewebapp
10 silly lifecycle nodewebapp@0.0.0~start: Args: [ '-c', 'node ./bin/www' ]
11 silly lifecycle nodewebapp@0.0.0~start: Returned: code: 1  signal: null
12 info lifecycle nodewebapp@0.0.0~start: Failed to exec start script
13 verbose stack Error: nodewebapp@0.0.0 start: `node ./bin/www`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid nodewebapp@0.0.0
15 verbose cwd /Users/leotyndall/Desktop/node/nodeexpress/nodewebapp
16 verbose Darwin 17.5.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v8.11.1
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error nodewebapp@0.0.0 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the nodewebapp@0.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Author

Commented:
DIsregard, I resolved the issue

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial