I’m running into a weird import error in my React app and could use a second pair of eyes.
I have this component where I’m trying to use the Gantt chart from wx-react-gantt, plus wrap it in a <Fullscreen> component so users can toggle full-screen mode. Here’s a simplified version of the code:
import React, { useRef } from "react";
import { Gantt, Fullscreen } from "wx-react-gantt";
import "wx-react-gantt/dist/gantt.css";
const MyComponent = () => {
const apiRef = useRef();
return (
<Fullscreen>
<Gantt
ref={apiRef}
/* other props… */
/>
</Fullscreen>
);
};
export default MyComponent;
When I start the app, I get this in the browser console:
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/wx-react-gantt.js?v=265c5dff'
does not provide an export named 'Fullscreen' (at SwimlaneView.jsx:6:17)
I’ve checked the package’s index.d.ts and README, but I don’t see any mention of a Fullscreen export being removed or renamed. My dependency version is:
"wx-react-gantt": "^1.3.1"
I’ve tried to Re-installing the package (rm -rf node_modules && npm install).
Has anyone encountered this before? Is there some alternative export for full-screen support now, or am I missing a step? Any pointers or workarounds would be much appreciated!
Thanks in advance