-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 error when using client without react #7005
Comments
Instead of importing from |
That fixes all the react issues, thanks! The downside here is that the TypeScript import helper will import only from |
I still have this error, don't know if it's typescript 4 related... it worked fine before I re-created my new project with angular-cli 10.1.1 and typescript 4.0.2 with strict, maybe I changed some code in the graphql module class but I don't quite remember, but now my project is broken so any help would be greatly appreciated. this is my graphql.module.ts code:
and my package.json is this:
any ideas ? |
@kfirufk well, you're not importing from |
@MatthiasKunnen - thanks for your prompt response |
@MatthiasKunnen - I started eliminating stuff in my project and i found out that in one of my components I had
so the |
The TSLint import-blacklist rule can help you prevent that. |
I agree, if package.json has |
This comment has been minimized.
This comment has been minimized.
Is this issue related to #1093? Since upgrading the package |
The original issue here has been addressed, so I'll close this off (please open subsequent issues separately). Thanks! |
- As per apollographql/apollo-client#7005, if we use @apollo/client imports then it includes react related packages as well, but that gives problem for us as this package is used inside sync module also which is executed inside node environment and hence doesn't have react library present
- As per apollographql/apollo-client#7005, if we use @apollo/client imports then it includes react related packages as well, but that gives problem for us as this package is used inside sync module also which is executed inside node environment and hence doesn't have react library present
- As per apollographql/apollo-client#7005, if we use @apollo/client imports then it includes react related packages as well, but that gives problem for us as this package is used inside sync module also which is executed inside node environment and hence doesn't have react library present
Intended outcome:
Using the client without react should not result in an error.
Note I do NOT want to enable
skipLibCheck
as this could hide actual problems.Actual outcome:
The following errors occur:
How to reproduce the issue:
Reproduction repo: https://github.com/MatthiasKunnen/apollo-client-no-react-reproduction.
Versions
The text was updated successfully, but these errors were encountered: