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

在Nuxt中引入Chakra UI v3之后控制台报错 Objects are not valid as a React child #165

Open
HeyCrab3 opened this issue Jan 21, 2025 · 3 comments

Comments

@HeyCrab3
Copy link

如图:

Image

App.vue 定义了setVeauryOptions:

Image

Chakra UI 自动生成的Provider:

Image

同时在引入之后命令行有警告提示

WARN [nuxt] Your project has pages but the component has not been used. You might be using the component instead, which will not work correctly in Nuxt. You can set pages: false in nuxt.config if you do not wish to use the Nuxt vue-router integration.

由于tsconfig是nuxt自动生成的所以我没有找到一个合适的解决方案

@devilwjp
Copy link
Collaborator

@HeyCrab3
在nuxt项目里,默认情况下,react的jsx要写在react_app目录下

@HeyCrab3
Copy link
Author

@HeyCrab3 在nuxt项目里,默认情况下,react的jsx要写在react_app目录下

怎么修改这个对应的目录

@devilwjp
Copy link
Collaborator

devilwjp commented Jan 21, 2025

@HeyCrab3
仔细阅读 https://github.com/gloriasoft/veaury?tab=readme-ov-file#vite
设置vueJsxInclude,不在这个范围内的,都将是reactJsx

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

2 participants