pmndrs / pmndrs/ecctrl

Build error in nextjs project

Open
#82 3 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.