Build error in nextjs project
Checking validity of types ..Failed to compile.
./node_modules/ecctrl/src/EcctrlJoystick.tsx:22:11 Type error: Type 'HTMLDivElement | null' is not assignable to type 'HTMLDivElement'. Type 'null' is not assignable to type 'HTMLDivElement'.
20 | 21 | const [windowSize, setWindowSize] = useState({ innerHeight, innerWidth })
22 | const joystickDiv: HTMLDivElement = document.querySelector("#ecctrl-joystick") | ^ 23 | 24 | /** 25 | * Animation preset Checking validity of types ...
Try adding this to your tsconfig: "strictNullChecks": false
Would it make sense to refactor ecctrl to not require changing the tsconfig? It's inconvenient for downstream library users to be required change their TS config to a less recommended setting.
@avaer
Would it make sense to refactor
ecctrlto not require changing thetsconfig? It's inconvenient for downstream library users to be required change their TS config to a less recommended setting.
I agree, this pack was not initially built in TS, those parts are still in progress