Click here to Skip to main content
15,890,724 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I new to nodejs and Openshift. im trying to deploy a school automation application built on NodeJS and MongoDB(manually uploaded files). When i tried to start the app by "node app.js" this error is being displayed:
module.js:340
throw err;
^
Error: Cannot find module '../service/StudentService.js'
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.<anonymous> (/var/lib/openshift/567b5ff37628e190b7000198/app-root/runtime/repo/routes/api.js:11:20)
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 Module.require (module.js:364:17)"

Please help me to resolve this error. I have searched many blogs and discussions, not one exactly explained what went wrong.
Posted
Comments
Sergey Alexandrovich Kryukov 24-Dec-15 13:58pm    
Help with what? What's the use to show exception stack without the code causing the exception? Your module is missing, so what? Find it out. It could be totally missing, misplaced, and so on...
—SA
Member 12226517 26-Dec-15 12:36pm    
ok. Found and Resolved it. But, a new error
express-session deprecated undefined resave option; provide resave option app.js:26:9
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option app.js:26:9

events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js:905:11)
at Server._listen2 (net.js:1024:19)
at listen (net.js:1065:10)
at Server.listen (net.js:1139:5)
at EventEmitter.app.listen (/var/lib/openshift/567cb82d2d5271f08e00000c/app-root/runtime/repo/node_modules/express/lib/application.js:595:24)
at Object.<anonymous> (/var/lib/openshift/567cb82d2d5271f08e00000c/app-root/runtime/repo/app.js:68:5)
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)

even after chaning port to 8080. I'm getting same. What should i do now?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900