Apollo-module: TypeError: Cannot read property 'defaultClient' of undefined

Created on 31 Dec 2019  Â·  6Comments  Â·  Source: nuxt-community/apollo-module

I generate static project and deploy in amazon s3, when refresh page I get error:

TypeError: Cannot read property 'defaultClient' of undefined

If my project deploy in node sever it work it.

apollo: { clientConfigs: { default: '~/plugins/apollo-config.js' } },

export default function (context) { return { httpEndpoint: process.env.HTTP_ENDPOINT, getAuth: () => { const token = localStorage.getItem('AUTH_TOKEN') if (token) { returnBearer ${token} } else { return '' } } } }

This question is available on Nuxt community (#c278)
question

Most helpful comment

Guys, just install v4.0.1-rc.1, it's fixed in that version by https://github.com/nuxt-community/apollo-module/commit/640ba3e6e543e368cebbb0b707983e4e61856ba2.

All 6 comments

This issue as been imported as question since it does not respect apollo-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/apollo-module/issues/c278.

@argueta15 did u resolve this problem? If yes – please tell me, facing the same problem now.

@argueta15 did u resolve this problem? If yes – please tell me, facing the same problem now. X2

I also have this problem. @argueta15 please let me know if you ever resolved it. thanks!

In my case it turned out I'd accidentally updated to Nuxt 2.13 without realizing it. I rolled back to 2.11 and everything was fine again.

Guys, just install v4.0.1-rc.1, it's fixed in that version by https://github.com/nuxt-community/apollo-module/commit/640ba3e6e543e368cebbb0b707983e4e61856ba2.

Was this page helpful?
0 / 5 - 0 ratings