I'm trying to learn the MERN stack, so I followed the starter guide on MongoDB.com. That all worked fine locally, but when I tried hosting it on Vercel (to get an idea of the limitations and challenges), it spat out a pretty confusing error:
Error: Module build failed (from /vercel/c502a1cc836b238f/.build-utils/.builder/node_modules/@zeit/ncc/dist/ncc/loaders/relocate-loader.js)
Here's the structure of the project
client
node_modules
public
src
index.js
App.js
package.json
server
server.js
package.json
db
conn.js
package.json
vercel.json
node_modules
.gitignore
The react app was made with create-react-app, and then I just copy-pasted the instructions from MongoDB. The server was made manually.
I tried installing and uninstalling both @vercel/ncc and @zeit/ncc, but neither seemed to change anything.
Thanks for taking the time to read this.