My Node js Project is working correctly on the Localhost , i deploy the project on the vercel ,build complete but after opening this error occur:
`Cannot find module '../sdam/server_selection'
Require stack:
- /var/task/node_modules/mongoose/node_modules/mongodb/lib/operations/execute_operation.js
- /var/task/node_modules/mongoose/node_modules/mongodb/lib/admin.js
- /var/task/node_modules/mongoose/node_modules/mongodb/lib/index.js
- /var/task/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js
- /var/task/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js
- /var/task/node_modules/mongoose/lib/index.js
- /var/task/node_modules/mongoose/index.js
- /var/task/Models/MatchFinder.js
- /var/task/Routes/Match Finder/Registration/MFRegistration.js
- /var/task/index.js
- /var/task/___now_launcher.js
- /var/runtime/index.mjs
Did you forget to add it to "dependencies" in `package.json`?
INIT_REPORT Init Duration: 264.89 ms Phase: init Status: error Error Type: Runtime.ExitError
Cannot find module '../sdam/server_selection'
Require stack:
- /var/task/node_modules/mongoose/node_modules/mongodb/lib/operations/execute_operation.js
- /var/task/node_modules/mongoose/node_modules/mongodb/lib/admin.js
- /var/task/node_modules/mongoose/node_modules/mongodb/lib/index.js
- /var/task/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js
- /var/task/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js
- /var/task/node_modules/mongoose/lib/index.js
- /var/task/node_modules/mongoose/index.js
- /var/task/Models/MatchFinder.js
- /var/task/Routes/Match Finder/Registration/MFRegistration.js
- /var/task/index.js
- /var/task/___now_launcher.js
- /var/runtime/index.mjs
Did you forget to add it to "dependencies" in `package.json`?
INIT_REPORT Init Duration: 441.57 ms Phase: invoke Status: error Error Type: Runtime.ExitError
Error: Runtime exited with error: exit status 1
after the error i check the package.json both mongodb and mongoos are define there , stil the errror code Any Suggestions?
New contributor
Ali Shah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.