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] Error since v1.44.3 #5349

Open
bentwnghk opened this issue Jan 8, 2025 · 2 comments
Open

[Bug] Error since v1.44.3 #5349

bentwnghk opened this issue Jan 8, 2025 · 2 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@bentwnghk
Copy link

📦 Environment

Docker

📌 Version

v1.44.3

💻 Operating System

Ubuntu

🌐 Browser

Chrome

🐛 Bug Description

Docker log:

⨯ Error: you must `import '@anthropic-ai/sdk/shims/web'` before importing anything else from @anthropic-ai/sdk

   at c (.next/server/chunks/59790.js:1:46337)

   at 605046 (.next/server/chunks/59790.js:2:5651)

   at t (.next/server/webpack-runtime.js:1:143)

   at 640279 (.next/server/chunks/87253.js:214:6072)

   at t (.next/server/webpack-runtime.js:1:143)

   at 702947 (.next/server/chunks/87253.js:230:77104)

   at t (.next/server/webpack-runtime.js:1:143)

   at 778403 (.next/server/chunks/87253.js:174:3342)

   at Object.t [as require] (.next/server/webpack-runtime.js:1:143) {

 digest: '1965366038'

}

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

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

👀 @bentwnghk

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 Jan 8, 2025

Hey there, @bentwnghk! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together while we wait for a human maintainer.

To resolve the error you're encountering, ensure that the import statement for @anthropic-ai/sdk/shims/web is placed at the very top of your import statements in your code. Here's the correct order:

// sort-imports-ignore
import '@anthropic-ai/sdk/shims/web';
import Anthropic from '@anthropic-ai/sdk';

Make sure this order is maintained in your codebase to prevent the error [1].

To continue talking to Dosu, mention @dosu.


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

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
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants