Hey everyone,
I’ve got a web application that I’m trying to host on vercel. The front end works, but when I’m trying to run my server, I get an error. I believe the error is related to mongoDB in some way, because the error log says:
Cannot find module './common'
Require stack:
- /var/task/server/node_modules/debug/src/node.js
- /var/task/server/node_modules/debug/src/index.js
- /var/task/server/node_modules/mquery/lib/mquery.js
- /var/task/server/node_modules/mongoose/lib/query.js
- /var/task/server/node_modules/mongoose/lib/index.js
- /var/task/server/node_modules/mongoose/index.js
Did you forget to add it to "dependencies" in `package.json`?
Error: Runtime exited with error: exit status 1
Runtime.ExitError
I checked the files inside node_modules, and the only thing that I see that could potentially be an error is this:
I see this in every require statement in
node_modules/mongoose
. However, it seems to be a Typescript issue, and my project is Javascript, so I’m not sure this is what’s causing the problems. [It works locally, so it must be okay…]I realize this may not be the appropriate place for this question, but I’ve been banging my head against the wall for a couple of days with this, and am very desperate at this point.
If you could please share any insights or guidance
Thank you!!