Last Updated: February 25, 2016
·
1.155K
· txshon

[Stuck]#NodeJS - Express error...

I learn how to setup #nodejs #express #mongodb, learning from
link
but I get this error when I open up my localhost :3000

<quote>
Express
500 TypeError: Cannot call method ‘findAll’ of undefined
at app.get.res.render.title (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/app.js:37:19)
at callbacks (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/nodemodules/express/lib/router/index.js:164:37)
at param (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/node
modules/express/lib/router/index.js:138:11)
at pass (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/nodemodules/express/lib/router/index.js:145:5)
at Router.
dispatch (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/nodemodules/express/lib/router/index.js:173:5)
at Object.router (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/node
modules/express/lib/router/index.js:33:10)
at next (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/nodemodules/express/nodemodules/connect/lib/proto.js:190:15)
at Object.methodOverride as handlePractice/NodeJS/EmployeeDB/nodemodules/express/nodemodules/connect/lib/middleware/methodOverride.js:49:5)
at next (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/nodemodules/express/nodemodules/connect/lib/proto.js:190:15)
at multipart (/Users/txshon/Dropbox/Google Drive/04)Practice/NodeJS/EmployeeDB/nodemodules/express/nodemodules/connect/lib/middleware/multipart.js:64:37)
</>

2 Responses
Add your response

Looks like your object employeeProvider's value is undefined. Do you have mongodb running?

over 1 year ago ·

Sorry, but don't you see this is a place to Share pro tips. You should post your question to stackoverflow instead :)

Regards,

over 1 year ago ·