在部署项目到 Vercel 时遇到以下问题:
文件名:comps/Navbar.js
被导入为:
文件名:comps/Navbar.js
被导入为:
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! friendlist@0.1.0 build: `next build`
16:36:51 npm ERR! Exit status 1
16:36:51 npm ERR!
16:36:51 npm ERR! Failed at the friendlist@0.1.0 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"
来自Net Ninja Next.js播放列表的代码
navbar
还是Navbar
? - juliomalves