-
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
Can't create ApolloClient instance #4892
Comments
did you try |
I changed it
|
Hi, I had the same problem. This is available in another issue. Here #4843 It works when you downgrade to 0.3.1 and can you try it that way? |
It am using 0.3.1 already: |
try |
It doesn't work. I changed to blow code. Is
and get this error:
|
Take a look on your stack-trace - now you have a different error.
|
Thanks for pointing out this and it works now. Just curious that why I need to use |
I'm tempted to close this as a duplicate of #4843, but it seems just different enough to remain open. We will likely fix both problems at the same time, soon! |
Can you try |
I updated the version to 0.4.1 but I still need to add |
@zhaoyi0113 you need to add If you run your node app with the support of ES6 modules - you'll be able to use |
I would say this is the same issue + lack of understanding about CJS/ES6 module system |
Oh, thanks for pointing out the issue. I close it for now. |
Below is my code:
I got this error:
The dependencies I have is:
I have tried to use
const {ApolloClient} = require('apollo-boost');
to require the ApolloClient but it reports this error:Invariant Violation: In order to initialize Apollo Client, you must specify 'link' and 'cache' properties in the options object
.The text was updated successfully, but these errors were encountered: