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.

Assessment

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

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.

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
Dominant language
TypeScript
Stars
823
Forks
102
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from pmndrs/ecctrl

All issues in pmndrs/ecctrl

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.