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

🐛 BUG: "Cannot stringify arbitrary non-POJOs" at dev and build #3303

Closed
1 task
retronav opened this issue May 5, 2022 · 0 comments · Fixed by #3304
Closed
1 task

🐛 BUG: "Cannot stringify arbitrary non-POJOs" at dev and build #3303

retronav opened this issue May 5, 2022 · 0 comments · Fixed by #3304

Comments

@retronav
Copy link
Contributor

retronav commented May 5, 2022

What version of astro are you using?

1.0.0-beta.24

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Linux, Ubuntu 21.10

Describe the Bug

Astro server crashes because of an error by devalue:

Error: Cannot stringify arbitrary non-POJOs
    at walk (/node_modules/.pnpm/[email protected]/node_modules/devalue/dist/devalue.esm.js?v=5074f74f:51:35)
    at Array.forEach (<anonymous>)
    at walk (/node_modules/.pnpm/[email protected]/node_modules/devalue/dist/devalue.esm.js?v=5074f74f:40:27)
    at /node_modules/.pnpm/[email protected]/node_modules/devalue/dist/devalue.esm.js?v=5074f74f:56:72
    at Array.forEach (<anonymous>)
    at walk (/node_modules/.pnpm/[email protected]/node_modules/devalue/dist/devalue.esm.js?v=5074f74f:56:40)
    at Module.devalue [as default] (/node_modules/.pnpm/[email protected]/node_modules/devalue/dist/devalue.esm.js?v=5074f74f:60:5)
    at Module.serializeProps (/node_modules/.pnpm/[email protected][email protected]/node_modules/astro/dist/runtime/server/hydration.js:4:17)
    at Module.renderComponent (/node_modules/.pnpm/[email protected][email protected]/node_modules/astro/dist/runtime/server/index.js:225:2)


 Although I have tried to isolate this to reproduce in Astro, my efforts have failed so far, but I have been able to produce the same error with devalue. This happens when you pass a class as a prop.

Link to Minimal Reproducible Example

https://runkit.com/embed/e00mijnhx0gg

Participation

  • I am willing to submit a pull request for this issue.
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

Successfully merging a pull request may close this issue.

1 participant