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

Error when run in latest Remix #4364

Open
4 tasks done
scottwansz opened this issue Nov 4, 2024 · 5 comments
Open
4 tasks done

Error when run in latest Remix #4364

scottwansz opened this issue Nov 4, 2024 · 5 comments

Comments

@scottwansz
Copy link

scottwansz commented Nov 4, 2024

Prerequisites

What theme are you using?

validator-ajv8

Version

5.x

Current Behavior

I follow the react-jsonschema-form quick start with latest pure clean empty Remix project get error as below:

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6120:9)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderIndeterminateComponent (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5852:7)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6023:7)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderContextProvider (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5997:3)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6094:11)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderIndeterminateComponent (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5852:7)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6023:7)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderContextProvider (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5997:3)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6094:11)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderIndeterminateComponent (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5852:7)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6023:7)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderIndeterminateComponent (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5852:7)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6023:7)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderNode (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6336:12)
at renderChildrenArray (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6288:7)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6218:7)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderNode (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6336:12)
at renderHostElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5708:3)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6029:5)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderNode (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6336:12)
at renderChildrenArray (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6288:7)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6218:7)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderNode (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6336:12)
at renderHostElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5708:3)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6029:5)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderIndeterminateComponent (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5852:7)
at renderElement (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6023:7)
at renderNodeDestructiveImpl (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6181:11)
at renderNodeDestructive (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:6153:14)
at renderContextProvider (C:\Users\scott\Desktop\remix-rjsf-demo\node_modules.pnpm\react-dom@18.3.1_react@18.3.1\node_modules\react-dom\cjs\react-dom-server.node.development.js:5997:3)

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS: Windows 11
- Node: node/21.1.0/x64
- pnpm: 8.15.5

Anything else?

the remix project I created by "npx create-vite" then select remix.

No response

@scottwansz scottwansz added bug needs triage Initial label given, to be assigned correct labels and assigned labels Nov 4, 2024
@scottwansz scottwansz changed the title <title> Error when run in latest Remix Nov 4, 2024
@heath-freenome heath-freenome removed the needs triage Initial label given, to be assigned correct labels and assigned label Nov 8, 2024
@nickgros
Copy link
Contributor

nickgros commented Nov 8, 2024

@scottwansz Can you provide a CodeSandbox example?

@nickgros nickgros added awaiting response needs reproducible example Missing a link to a reproduction in the playground, CodeSandbox, JSFiddle, etc. labels Nov 8, 2024
@scottwansz
Copy link
Author

@nickgros
Copy link
Contributor

@scottwansz Sorry, I get a "not found" error when I try to open that link

@scottwansz
Copy link
Author

@scottwansz Sorry, I get a "not found" error when I try to open that link

sorry, i forget change the permmission, now you access.

@nickgros nickgros added needs triage Initial label given, to be assigned correct labels and assigned and removed awaiting response needs reproducible example Missing a link to a reproduction in the playground, CodeSandbox, JSFiddle, etc. labels Nov 22, 2024
@nickgros
Copy link
Contributor

nickgros commented Nov 22, 2024

For some reason, SSR is not working. We have not put a ton of effort into SSR use cases for RJSF, so this is not surprising. As a workaround you can do CSR, e.g.

  const [isClient, setIsClient] = useState(false)
  useEffect(() => {
    setIsClient(true)
  }, [])
  return (<>
    {isClient && (<Form {...props} />)}
  </>)

Here's a similar issue: #4083

Us maintainers don't have the bandwidth to dive in deep for every issue, so any help creating PRs or pinpointing the bug would be appreciated.

@nickgros nickgros added help wanted and removed needs triage Initial label given, to be assigned correct labels and assigned labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants