Encountered an issue while trying to deploy a project on Vercel. The error message is as follows:
fileName: comps/Navbar.js
imported as
import Navbar from "./Navbar";
16:36:51 ModuleNotFoundError: Module not found: Error: Can't resolve '../comps/navbar' in '/vercel/workpath0/pages'
16:36:51 > Build error occurred
16:36:51 Error: > Build failed because of webpack errors
16:36:51 at /vercel/workpath0/node_modules/next/dist/build/index.js:15:918
16:36:51 at processTicksAndRejections (internal/process/task_queues.js:93:5)
16:36:51 at async /vercel/workpath0/node_modules/next/dist/build/tracer.js:1:525
16:36:51 npm ERR! code ELIFECYCLE
16:36:51 npm ERR! errno 1
16:36:51 npm ERR! [email protected] build: `next build`
16:36:51 npm ERR! Exit status 1
16:36:51 npm ERR!
16:36:51 npm ERR! Failed at the [email protected]) build script.
16:36:51 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
16:36:51 npm ERR! A complete log of this run can be found in:
16:36:51 npm ERR! /vercel/.npm/_logs/2021-03-02T11_06_51_966Z-debug.log
16:36:51 Error: Command "npm run build" exited with 1
16:36:56 Done with "package.json"
This code was sourced from Net Ninja's Next.js playlist.