Closed wanjohiryan closed 2 months ago
looks like an import cycle issue to me. It's trying to read .useContext from somewhere, so that's likely a module. I just don't understand why the module would be null
instead of undefined
.
Can you use bun dev.debug
(iirc) to check out the issue where it breaks?
To be honest, I don't know how that works.... But on further investigation, it looks like Qwik React does not like when I import anything in a react island.
For example:
β This works
/** @jsxImportSource react */
//This is used for testing whether the Qwik React components are working
import { useState } from "react"
import { qwikify$ } from "@builder.io/qwik-react"
export const ReactExample = () => {
return (
<div>
Hello There
</div>
)
}
export const Example = qwikify$(ReactExample)
βThis fails... even if i call it without initialising using client:load
/** @jsxImportSource react */
//This is used for testing whether the Qwik React components are working
import { useState } from "react"
import { qwikify$ } from "@builder.io/qwik-react"
import { motion } from "framer-motion"
export const ReactExample = () => {
return (
<motion.div>
Hello There
</motion.div>
)
}
export const Example = qwikify$(ReactExample)
Very interesting
For future reference:
I ended up using an earlier version of the project, you can check it out here
@wanjohiryan :thinking: so you're saying that qwik-react v1.5.1 breaks for you?
Which component is affected?
Qwik React
Describe the bug
Hello There ππΎ
I keep getting the error
While trying out
qwik-react
in a turbo mono-repo structure.... this was previously not an issue, until I tried creating a new mono-repo today.Reproduction
none
Steps to reproduce
bunx create-turbo@latest
cd
into the directory (ex. cd mono/apps)bunx create-qwik@latest
cd
into your qwik directory (ex. cd qwik)react
integrationbun qwik add react
bun dev
dev_url/react
which in most cases will behttp://local:5173/react
System Info
Additional Information
This was not an issue a while back, i don't understand why all over sudden React throws this error.
Or am I missing something?