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
Problem with using react three fiber in grafana #22
Comments
2nd this having same problem but in a Next.js app, just installed all necessary deps and libs |
3rd this Just have a "dependencies": {
"@react-three/drei": "^8.10.6",
"@react-three/fiber": "^8.9.1",
"@types/three": "^0.146.0",
"autoprefixer": "^10.4.13",
"next": "12.1.0",
"postcss": "^8.4.20",
"react": "17.0.2",
"react-dom": "17.0.2",
"tailwindcss": "^3.2.4",
"three": "^0.147.0"
},
import { Canvas } from "@react-three/fiber";
export default function Home() {
return (
<div className="flex flex-colitems-center justify-center">
<Canvas camera={{ position: [0, 0, 5] }}>
<ambientLight />
<pointLight position={[10, 10, 10]} />
<mesh>
<boxBufferGeometry args={[2, 2, 2]} />
<meshStandardMaterial color="hotpink" />
</mesh>
</Canvas>
</div>
);
} error - Error: its-fine: useFiber must be called within a ! |
This would likely come from mismatched versions of |
That worked. updated package.json pasted below "dependencies": {
"@react-three/drei": "^8.10.6",
"@react-three/fiber": "^8.9.1",
"@types/three": "^0.146.0",
"autoprefixer": "^10.4.13",
"next": "^13.0.7",
"postcss": "^8.4.20",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.49.8",
"tailwindcss": "^3.2.4",
"three": "^0.147.0"
}, |
Hi, I'm using grafana.
And I'm trying to create grafana plugin, witch is basically react component with custom props.
When adding
<Canvas/>
into JSX I getits-fine: useFiber must be called within a <FiberProvider />!
I really don't know what's wrong, nether can I find anything useful online, and I'm not sure if this issue belongs in this ripo or not I'm just looking for a step in right direction, cuz I've ran out of options.
I think that maybe webpack config is at fault.
So here is grafana default webpack config:
The text was updated successfully, but these errors were encountered: