[11ty] Objects are not valid as a React child
petar-v opened this issue · comments
Petar Vasilev commented
Hi! Thank you so much for your great contributions! I would like to use Slinkity instead of Astro for my project. I like that it's more configurable and I can expose things like the babel config.
Describe the bug
Getting an error when trying to open the default starting website.
To Reproduce
Steps to reproduce the behavior:
- Run
npm init slinkity
- Make the following selection:
Need to install the following packages:
create-slinkity@2.0.1
Ok to proceed? (y)
✔ What is your project called? … my-slinkity-site
✔ What flavor of components do you want, if any? › Preact, Vue, Svelte, React
Welcome to your first Slinkity site!
cd
into dir and runnpm i
- run
npm start
- try to open the webpage via the browser
- see error in terminal, and the browser just continues to load
Expected behavior
To be able to view the website.
Error message
3:49:55 PM [vite-plugin-svelte] ssr compile in progress ...
[11ty] Unhandled rejection in promise: (more in DEBUG output)
[11ty] Objects are not valid as a React child (found: object with keys {type, props, key, ref, __k, __, __b, __e, __d, __c, __h, constructor, __v, __source, __self, __o}). If you meant to render a collection of children, use an array instead. (via Error)
[11ty]
[11ty] Original error stack trace: Error: Objects are not valid as a React child (found: object with keys {type, props, key, ref, __k, __, __b, __e, __d, __c, __h, constructor, __v, __source, __self, __o}). If you meant to render a collection of children, use an array instead.
[11ty] at mapIntoArray (some-dir/my-slinkity-site/node_modules/react/cjs/react.development.js:1037:17)
[11ty] at mapChildren (some-dir/my-slinkity-site/node_modules/react/cjs/react.development.js:1066:3)
[11ty] at toArray (some-dir/my-slinkity-site/node_modules/react/cjs/react.development.js:1116:10)
[11ty] at ReactDOMServerRenderer.render (some-dir/my-slinkity-site/node_modules/react-dom/cjs/react-dom-server.node.development.js:3779:28)
[11ty] at ReactDOMServerRenderer.read (some-dir/my-slinkity-site/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
[11ty] at renderToString (some-dir/my-slinkity-site/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
[11ty] at ssr (some-dir/my-slinkity-site/node_modules/@slinkity/react/ssr.cjs:13:11)
[11ty] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[11ty] at async some-dir/my-slinkity-site/node_modules/slinkity/dist/index.cjs:173:26
[11ty] at async Promise.all (index 0)
[11ty] at async handleSsrComments (some-dir/my-slinkity-site/node_modules/slinkity/dist/index.cjs:142:5)
[11ty] at async EleventyDevServer.applyViteHtmlTransform (some-dir/my-slinkity-site/node_modules/slinkity/dist/index.cjs:202:28)
^C%
(please complete the following information):
- OS: Arch btw
- Browser: Any browser
- Node Version: v20.3.0