Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] dockerfile部署Type error: Cannot find module '@lobehub/ui/es/LogoThree' or its corresponding type declarations. #4952

Closed
yincangshiwei opened this issue Dec 10, 2024 · 7 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@yincangshiwei
Copy link

📦 部署环境

Docker

📌 软件版本

1.36.5

💻 系统环境

Other Linux

🌐 浏览器

Chrome

🐛 问题描述

使用dockerfile部署提示下面错误,已经加了--no-cache
450.1 ./src/components/Branding/WelcomeLogo/LobeChat.tsx:7:40
450.1 Type error: Cannot find module '@lobehub/ui/es/LogoThree' or its corresponding type declarations.
450.1
450.1 5 | import { Center } from 'react-layout-kit';
450.1 6 |
450.1 > 7 | const LogoThree = dynamic(() => import('@lobehub/ui/es/LogoThree'), { ssr: false });
450.1 | ^
450.1 8 | const LogoSpline = dynamic(() => import('@lobehub/ui/es/LogoThree/LogoSpline'), { ssr: false });
450.1 9 |
450.1 10 | const WelcomeLogo = memo<{ mobile?: boolean }>(({ mobile }) => {

📷 复现步骤

docker build -t lobechat --build-arg USE_CN_MIRROR=true --no-cache .

🚦 期望结果

No response

📝 补充信息

No response

@yincangshiwei yincangshiwei added the 🐛 Bug Something isn't working | 缺陷 label Dec 10, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Dec 10, 2024
@lobehubbot
Copy link
Member

👀 @yincangshiwei

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Dec 10, 2024

The error you're encountering indicates that the module @lobehub/ui/es/LogoThree cannot be found. Here are a few steps you can take to troubleshoot and potentially resolve this issue:

  1. Check Module Availability: Ensure that the @lobehub/ui package version ^1.152.0 is correctly installed in your project. You can verify this by checking the node_modules directory or by running npm list @lobehub/ui to see if the package is listed.

  2. Verify Module Path: Double-check the path @lobehub/ui/es/LogoThree to ensure it is correct. It's possible that the module might be located in a different directory or might have been renamed or removed in recent updates.

  3. Update Dependencies: Run npm install or yarn install to ensure all dependencies are up to date. This can sometimes resolve issues with missing modules.

  4. Check for Recent Changes: If there have been recent updates to the @lobehub/ui package, review the changelog or commit history to see if there were any changes related to the LogoThree module.

  5. Dynamic Import Fallback: If the module is optional or has a fallback, consider adding error handling to the dynamic import to manage cases where the module is not found.

  6. Docker Cache: Since you're using Docker, ensure that the build context is correct and that there are no caching issues. The --no-cache flag should help, but double-check the Dockerfile and build context.

If these steps do not resolve the issue, you may need to look into the specific implementation details of the @lobehub/ui package or consult any available documentation or support channels for further assistance.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@bestZwei
Copy link

vercel也遇到了

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


vercel also encountered

@arvinxx
Copy link
Contributor

arvinxx commented Dec 10, 2024

升级到最新的版本

@arvinxx arvinxx closed this as completed Dec 10, 2024
@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Dec 10, 2024
@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Upgrade to the latest version

@lobehubbot
Copy link
Member

@yincangshiwei

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Archived in project
Development

No branches or pull requests

4 participants