TypeError: Cannot use 'in' operator to search for 'text' in t

Could you share a link in the backlog for tracking this issue? My error isn't related to slicemachine (currently in the process of upgrading to the latest versions).

<PrismicRichText field={"my text"} />

results with:

[next] error - TypeError: Cannot use 'in' operator to search for 'text' in t
[next] at nodeToTreeNode (/src/node_modules/@prismicio/richtext/dist/index.cjs:66:14)
[next] at asTree (/src/node_modules/@prismicio/richtext/dist/index.cjs:15:19)
[next] at Object.serialize (/src/node_modules/@prismicio/richtext/dist/index.cjs:146:5)
[next] at /src/node_modules/@prismicio/react/dist/index.cjs:283:46
[next] at Object.useMemo (/src/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5124:19)
[next] at Object.useMemo (/src/node_modules/react/cjs/react.development.js:1650:21)
[next] at PrismicRichText (/src/node_modules/@prismicio/react/dist/index.cjs:275:27)
[next] at renderWithHooks (src/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
[next] at renderIndeterminateComponent (/src/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5731:15)
[next] at renderElement (/src/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5946:7) {
[next] page: '/resources/[category]'
[next] }

It would also be helpful to have the field throw an error that includes the arg causing the error, at present, it has been a trial and error situation for me :sweat_smile:

Hi @jsgaisie ,

The issue you were referencing here has been resolved, so I moved this to a new thread.

With the example you sent, though, there is an issue in that you are passing the value my text this isn't a valid API ID it would need to be something like my_text or, more specifically if it's in a Slice you'll need to pass it as something like slice.primary.my_text.

Can you tell me if you are querying this from a Slice or from a Static Zone? Is it a key text or rich text?