You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're importing a component that needs createContext. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
Maybe one of these should be marked as a client entry with "use client":
./node_modules@ant-design\icons\es\components\Context.js
./node_modules\antd\es\config-provider\index.js
./node_modules\form-render\lib\form-core\index.js
./node_modules\form-render\lib\index.js
./src\app\page.tsx
1.依赖仓库的版本(Dependencies versions):
2.问题描述(Bug description):
在一个新的next.js项目中引入form-render之后,报以下错误:
./node_modules@ant-design\icons\es\components\Context.js
ReactServerComponentsError:
You're importing a component that needs createContext. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
,-[D:\Products\AgileTools\test-next\node_modules@ant-design\icons\es\components\Context.js:1:1]
1 | import { createContext } from 'react';
: ^^^^^^^^^^^^^
2 | var IconContext = /#PURE/createContext({});
3 | export default IconContext;
`----
Maybe one of these should be marked as a client entry with "use client":
./node_modules@ant-design\icons\es\components\Context.js
./node_modules\antd\es\config-provider\index.js
./node_modules\form-render\lib\form-core\index.js
./node_modules\form-render\lib\index.js
./src\app\page.tsx
3.出现问题的 schema demo(Reproduction schema demo):
任何的schema都会导致上述问题,上述问题可能不是schema的问题
请问一下,这个问题是否有解决办法?form-render是否无法实现服务器端渲染?
The text was updated successfully, but these errors were encountered: