pmndrs / pmndrs/ecctrl

Using Typescript: Could not find a declaration file for module 'ecctrl'

Open
#25 11 comments 2 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

Hi,
I am excited to use ecctrl, however I am getting the following error when importing the module.

Type error: Could not find a declaration file for module 'ecctrl'. '/Users/konstantinlackner/Dev/konchord-experience-demo/node_modules/ecctrl/dist/Ecctrl.js' implicitly has an 'any' type. Try npm i --save-dev @types/ecctrl if it exists or add a new declaration (.d.ts) file containing declare module 'ecctrl';

I tried npm i --save-dev @types/ecctrl but it is not in the npm registry.

Any idea how to fix this?

Screenshot 2024-01-06 at 12 54 29

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

Reproduce the TypeScript import error, then inspect the published dist/Ecctrl.js entry point and any declaration (.d.ts) files in the ecctrl package. Done means a TypeScript consumer can import ecctrl without the missing-declaration error; verify the package's type-checking setup against the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.