Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types can't be found for tinyld/light #22

Closed
urlDev opened this issue May 16, 2023 · 3 comments
Closed

Types can't be found for tinyld/light #22

urlDev opened this issue May 16, 2023 · 3 comments

Comments

@urlDev
Copy link

urlDev commented May 16, 2023

Hey,

After comparing against multiple different packages/APIs, I decided to go with tinyld for my project, great work! However, when I wanted to import and use tinyld/light, I bumped into issues regarding type declarations.

Cannot find module 'tinyld/light' or its corresponding type declarations.

Looking at the package.json, I can see that you have declared type destination but seems like there is an issue about that regarding exports/paths.

@kefniark
Copy link
Contributor

kefniark commented May 17, 2023

Ok probably just some config issue in package.js, I will try to take a look at that later.
Just to check, do you use ESM or commonjs? and which version of NodeJS version are you using?

Meanwhile you can use tinyld, type should be working and api are the same

@kefniark
Copy link
Contributor

kefniark commented May 17, 2023

Indeed I found something off, some package.json fields like "main" and "exports" were apparently fighting each other.
I published a new version to fix this issue.

You can install it with: yarn add tinyld@1.3.4 or npm install tinyld@1.3.4
Can you give a try it and see if it solve your problem.

To double check, I also created a small sample project to reproduce the problem, and it seems to be working fine:

  • Tested with .js and commonJS
    image

  • Tested with .ts and ESM
    image

@urlDev
Copy link
Author

urlDev commented May 19, 2023

I installed and checked it in my local as well, and works as expected. Great job!

@urlDev urlDev closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants