You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I've deployed a next.js app in AWS Amplify and while it works fine on my local machine I'm getting this error when I try to access any of the /api/ route:
ERROR Unhandled Promise Rejection {
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "TypeError: Cannot read property 'match' of undefined",
"reason": {
"errorType": "TypeError",
"errorMessage": "Cannot read property 'match' of undefined",
"stack": [
"TypeError: Cannot read property 'match' of undefined",
" at new ConnectionString (/var/task/chunks/925.js:11169:27)",
" at parseOptions (/var/task/chunks/925.js:21799:17)",
" at new MongoClient (/var/task/chunks/925.js:26423:63)",
" at connectToDatabase (/var/task/chunks/817.js:30:18)",
" at handler (/var/task/pages/api/assets.js:191:97)",
" at Object.apiResolver (/var/task/chunks/925.js:36862:15)",
" at processTicksAndRejections (internal/process/task_queues.js:95:5)",
" at async Module.<anonymous> (/var/task/chunks/925.js:34836:13)"
]
},
"promise": {},
"stack": [
"Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'match' of undefined",
" at process.<anonymous> (/var/runtime/index.js:35:15)",
" at process.emit (events.js:400:28)",
" at processPromiseRejections (internal/process/promises.js:245:33)",
" at processTicksAndRejections (internal/process/task_queues.js:96:32)"
]
}
I'm sure it has something to with mongodb
since the error is happening in MongoClient
but I'm not sure what exactly the problem is. Please help.
-----------------------
code from AWS project ideas.