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

[Tdesign] 使用nextjs引入tdesign报错 #2548

Closed
ArSrNa opened this issue Oct 16, 2023 · 1 comment
Closed

[Tdesign] 使用nextjs引入tdesign报错 #2548

ArSrNa opened this issue Oct 16, 2023 · 1 comment

Comments

@ArSrNa
Copy link

ArSrNa commented Oct 16, 2023

tdesign-react 版本

1.2.4

重现链接

No response

重现步骤

在nextjs框架中使用tdesign,按照文档引入css
import 'tdesign-react/es/style/index.css'

期望结果

正确加载页面

实际结果

报错 Failed to compile

./node_modules/.pnpm/tdesign-react@1.2.4_react-dom@18.2.0_react@18.2.0/node_modules/tdesign-react/es/affix/style/index.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules\.pnpm\tdesign-react@1.2.4_react-dom@18.2.0_react@18.2.0\node_modules\tdesign-react\es\affix\style\css.js

即使注释掉引入css的那一段仍然不行

框架版本

react 18.2.0; next 13.5.4

浏览器版本

No response

系统版本

No response

Node版本

18.1

补充说明

No response

@github-actions
Copy link
Contributor

👋 @ArSrNa,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@ArSrNa ArSrNa changed the title [Tdesign] 描述问题的标题 [Tdesign] 使用nextjs引入tdesign报错 Oct 16, 2023
@ArSrNa ArSrNa closed this as completed Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant