本页还没有译文
本页 7 段还没译成简体中文,下面显示的是英文原文。TypeScript error "Cannot find namespace 'JSX'"
还没翻译译自英文(ai-sdk.dev)本页 7 段都还没译
Issue
I am using the AI SDK in a project without React, e.g. an Hono server, and I get the following error:
error TS2503: Cannot find namespace 'JSX'.
Background
The AI SDK has a dependency on @types/react which defines the JSX namespace.
It will be removed in the next major version of the AI SDK.
Solution
You can install the @types/react package as a dependency to fix the error.
npm install @types/reactAI 翻译查看英文原文