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 no longer found when importing filters directly #95

Open
gponnath opened this issue Oct 4, 2024 · 1 comment
Open

Types no longer found when importing filters directly #95

gponnath opened this issue Oct 4, 2024 · 1 comment

Comments

@gponnath
Copy link

gponnath commented Oct 4, 2024

I am working on upgrading to style dictionary v4, and therefore upgraded the this utils packages to the latest version as well.

I still had module resolution set to node in my tsconfig:

"module": "ESNext",
"moduleResolution": "Node",

Immediately after upgrading, I had the following error in my build.ts file:

Cannot find module 'style-dictionary-utils' or its corresponding type declarations. There are types at '/DesignSystem/node_modules/style-dictionary-utils/dist/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.ts(2307)
image

I switched module resolution to bundler, which fixed the main import, but now have the following issue that I'm not sure how to resolve:
Cannot find module 'style-dictionary-utils/dist/filter/isDuration.js' or its corresponding type declarations.ts(2307)
Cannot find module 'style-dictionary-utils/dist/filter/isDimension.js' or its corresponding type declarations.ts(2307)
image

I noticed that types are not explicitly specified in the package.json for style dictionary utils, I wasn't sure if that was a potential cause. I also noticed that this is the first time a package has required me to update my module resolution, and I use other esm only packages, so I'm not entirely sure what is different there.

@pmqueiroz
Copy link

Same here 🆙

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