Vue 部署服务器打包报错,本地可以问题_vue mac打包报错 window打包不报错-CSDN博客
背景:
问题背景是这样的,我们用Vue搭建项目,在我Mac os和前端同事Windows 上执行npm run build 都没有问题,运维同学打包执行npm run build却报错,找不到文件.
Could not resolve "./component/BeforeMessageList/BeforeMessageList.tsx" from "src/pages/assistant/AssistantPage.tsx"
file: /nodejs/kattgattAIAssistant/src/pages/assistant/AssistantPage.tsx
error during build:
RollupError: Could not resolve "./component/BeforeMessageList/BeforeMessageList.tsx" from "src/pages/assistant/AssistantPage.tsx"
at error (file:///nodejs/kattgattAIAssistant/node_modules/rollup/dist/es/shared/parseAst.js:337:30)
at ModuleLoader.handleInvalidResolvedId (file:///nodejs/kattgattAIAssistant/node_modules/rollup/dist/es/shared/node-entry.js:17967:24)
at file:///nodejs/kattgattAIAssistant/node_modules/rollup/dist/es/shared/node-entry.js:17927:26
解决:
MacOS和WIndows都是大小写不敏感,LInux大小写敏感,项目不规范,有些大小写引用没注意。
修改前
欢迎来撩 : 汇总all