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

Astro support? #89

Open
blimey85 opened this issue Feb 25, 2024 · 1 comment
Open

Astro support? #89

blimey85 opened this issue Feb 25, 2024 · 1 comment

Comments

@blimey85
Copy link

I've been using this in my Next.js projects and it works great. I'm working on an Astro project right now and can't get it to work, even though I have React loaded into Astro. This is my first Astro project and from what I have read, some React stuff works and some doesn't with Astro.

@Xevion
Copy link

Xevion commented May 27, 2024

Hey, this just happened to me, and I managed to solve it.

// The website states you should do this
import Balancer from "React-wrap-balancer";

// But it only worked if I did this
import { Balancer } from "react-wrap-balancer";

You can see where I solved it for my project on this commit. You'll be able to inspect all package versions here, too.

The precise error I got was

TypeError: Cannot read properties of undefined (reading 'toString')
    at Object.check (C:\Users\Xevion\projects\undefined.behavio.rs\node_modules\.pnpm\@astrojs+react@3.4.0_@types+react-dom@18.2.17_@types+react@18.2.39_react-dom@18.2.0_react@18._jyw2zw4waw6up4jito5lnr2tly\node_modules\@astrojs\react\server.js:23:32)
    at renderFrameworkComponent (C:\Users\Xevion\projects\undefined.behavio.rs\node_modules\.pnpm\astro@4.0.3_sass@1.69.5_typescript@5.3.2\node_modules\astro\dist\runtime\server\render\component.js:98:33)
    at async Module.renderComponent (C:\Users\Xevion\projects\undefined.behavio.rs\node_modules\.pnpm\astro@4.0.3_sass@1.69.5_typescript@5.3.2\node_modules\astro\dist\runtime\server\render\component.js:346:10)

Any time the page with the component was loaded (and astro build).

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

No branches or pull requests

2 participants