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

Cannot find module './Expression' AND Cannot find module './ParsedError' #23

Closed
mbourret opened this issue Nov 6, 2019 · 0 comments
Closed

Comments

@mbourret
Copy link

mbourret commented Nov 6, 2019

"npm i react-filter-box" in an app that uses typescript and when I run build I get TS2307 build errors, "Cannot find module './Expression'" and "Cannot find module './ParsedError'".

MicrosoftTeams-image

I checked the node_modules/react-filter-box/lib/src/ folder and sure enough both Expression.d.ts and ParsedError.d.ts files are missing.

I pulled down a local copy of react-filter-box and noticed the same thing in lib/src folder after running "npm run component-package".

After some google searching, it looks like a known issue for awesome-typescript-loader skips declaration type files (ie with interfaces in them).

s-panferov/awesome-typescript-loader#411

I tested the posted suggestion, swapped out the awesome-typescript-loader in webpack loaders to use ts-loader and re-ran component-package. Sure enough, both Expression.d.ts and ParsedError.d.ts showed up where they were expected.

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

1 participant