简体   繁体   English

NextJS 导入/导出的 Digital Ocean App 构建错误

[英]Digital Ocean App build error with NextJS imports/exports

I have a problem with building app process in Digital Ocean, I have an app already deployed and I have implemented a big refactor in the code structure, in my local I can make a build perfectly but when I tried to make build in digital ocean I have received an error with imports and exports我在 Digital Ocean 中构建应用程序流程时遇到问题,我已经部署了一个应用程序,并且我在代码结构中实现了一个大重构,在我的本地我可以完美地构建,但是当我尝试在数字海洋中构建时,我已收到导入和导出错误在此处输入图像描述

I have the same node version in Digital Ocean and local (v16.15.0)我在 Digital Ocean 和本地有相同的节点版本(v16.15.0)

any idea about the problem?关于这个问题的任何想法?

I fixed the bug, it was a problem with git, in my refactor I changed some filenames to use camelCase and the ToolBar file was being cached with its previous name.我修复了这个错误,这是 git 的问题,在我的重构中,我更改了一些文件名以使用 camelCase,并且 ToolBar 文件以其以前的名称被缓存。

I mean我是说

  • previous name: src/components/Toolbar/ToolBar.tsx以前的名称:src/components/Toolbar/ToolBar.tsx

  • current name: src/components/ToolBar/ToolBar.tsx当前名称:src/components/ToolBar/ToolBar.tsx

this failed because in the git repository it kept the old name while in my local repository it had the updated name.这失败了,因为在 git 存储库中它保留了旧名称,而在我的本地存储库中它具有更新的名称。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NextJs 路由器 404 从 Digital Ocean 刷新 - NextJs router 404ing on refresh from Digital Ocean 在数字海洋上的反应应用程序中上传图像 - Uploading image in react app on digital ocean Digital Ocean 应用程序部署错误:package 和 package-lock 不同步运行 npm ci - Digital Ocean app deployment error: package and package-lock are not in sync running npm ci 错误:在 /app/node_modules/chart.js/package.json 中没有使用 nextjs 和 chartjs 定义“导出”主要内容 - Error: No "exports" main defined in /app/node_modules/chart.js/package.json with nextjs and chartjs 通过公共 http 路由请求 Next.js web 服务在数字海洋应用平台上返回 404 错误 - Requesting Next.js web service through public http route returns 404 error on Digital Ocean App Platform 在 Windows 上的 nextJs 应用程序中使用绝对导入 - Use absolute imports in nextJs App on Windows Vercel 的 NextJS 构建和部署错误 - NextJS build and deployment error with Vercel 动态导入 - NextJS - Dynamic Imports - NextJS 构建 NextJs 应用程序时如何解决“发生构建错误 ReferenceError: self is not defined”错误? - How to solve 'Build error occurred ReferenceError: self is not defined' error while building NextJs app? 错误:没有可用于依赖类型的模块工厂:CssDependency on build a nextjs app - mini-css-extract-plugin - Error: No module factory available for dependency type: CssDependency on build a nextjs app - mini-css-extract-plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM