-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Typescript Import Errors #2978
Comments
Thanks, so we need to remove the declarations from the |
Just tried version 2.8.0 and this bug still exists. I created a repository that demonstrates the issue. Apparently, since some the I noticed that #2984 is currently being worked. Is that slated for the next release or will that be a while yet? |
No, #2984 will take weeks. We'll have to hotfix 2.8.0. |
@mtakayuki I tested the #2988 patch in your repository, and there are no more compilation errors. Thanks a lot for taking the time to post the code demonstrating the issue! |
as of |
Did you wipe out the node_modules and reinstall? I used your repository and couldn't see the errors. |
yes
And i'm not sure which repo you referring to, The immediate workaround is But better to fix the lib :) |
Hi. Should this be set back to true again now that things the different packages are typescript? Getting
import { Admin, Resource, ListGuesser } from 'react-admin'; on v2.9.8 |
The declare module 'react-admin'; |
Discussion regarding TS has moved to #1617 (comment) |
What you were expecting:
Expected that a Typescript based react-admin website that had no Typescript compile errors would continue to not have any compile errors when react-admin was updated from version 2.7.2 to 2.7.3.
What happened instead:
An import statement like:
import { Layout } from 'react-admin';
began displaying errors like:
Module '".../web/node_modules/react-admin/esm"' has no exported member 'Layout'.
Other information:
I believe this behavior was introduced in PR #2924 when the following change was made to the react-admin/package.json file:
"declaration": true,
Apparently, since the
ra-ui-materialui
package is not yet producing types, any types found in that package that are imported in Typescript cause errors.Environment
The text was updated successfully, but these errors were encountered: