ink-testing-library icon indicating copy to clipboard operation
ink-testing-library copied to clipboard

Fix: VSCode cannot find package typings

Open iliasbhal opened this issue 1 year ago • 2 comments

Issue:

VS code couldn't find the typings of the project.

https://github.com/vadimdemedes/ink-testing-library/assets/9442803/945c9046-9cf7-4e67-ba99-21bb3db0dd98

What Has Been Done:

I used the types attribute in package.json to ensure Vscode find the typings. Source: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package

iliasbhal avatar Jun 14 '23 05:06 iliasbhal

cc @vadimdemedes , What do you think?

iliasbhal avatar Jun 26 '23 11:06 iliasbhal

Another option is #21, if it has a main then tsserver will be able to find it.

isaacs avatar Jul 18 '23 17:07 isaacs

The problem here is your tsconfig. Make sure you follow: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm

sindresorhus avatar May 22 '24 10:05 sindresorhus