Build error in nextjs project
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 797
- Forks
- 98
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Description
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 ...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the type-checking failure in node_modules/ecctrl/src/EcctrlJoystick.tsx at line 22 and reproduce the Next.js build error. Review the document.querySelector usage and verify the finished change by running the project's type check or build until this error is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, react, typescript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100