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

Conflict when using ApolloSSR.prefetchAll() #378

Closed
negezor opened this issue Sep 1, 2018 · 6 comments
Closed

Conflict when using ApolloSSR.prefetchAll() #378

negezor opened this issue Sep 1, 2018 · 6 comments

Comments

@negezor
Copy link

negezor commented Sep 1, 2018

I update the apollo-module module under vue-apollo to v3.0.0-beta.20. I ran into the fact that when ApolloSSR.prefetchAll() is called, it conflicts with other modules that need a main VM. Nuxt.js error:

 TypeError: _vm._ssrStyle is not a function
  at Object.render (pages_releases_index.js:374:21)
  at Promise (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:54:24)
  at new Promise (<anonymous>)
  at walkTree (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:26:10)
  at Promise.all.components.map.component (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:20:33)
  at Array.map (<anonymous>)
  at Object.exports.getQueriesFromTree (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:20:16)
  at Object.exports.prefetchAll (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:11:18)
  at beforeNuxtRender (server-bundle.js:2310:67)
  at promisify (server-bundle.js:3874:15)
  at Promise.all.ssrContext.beforeRenderFns.map.fn (server-bundle.js:3303:116)
  at Array.map (<anonymous>)
  at beforeRender (server-bundle.js:3303:50)
  at module.exports.../website/app/.nuxt/server.js.__webpack_exports__.default (server-bundle.js:3479:9)
@mixno373
Copy link

mixno373 commented Sep 2, 2018

Hi, Negezor))

@ciscorn
Copy link
Contributor

ciscorn commented Sep 2, 2018

I think this error occurs when the component template have some attributes like :class={'is-active': dataA}, :style={color: dataB}, etc.

@Akryum Akryum closed this as completed in 1a50110 Sep 2, 2018
@negezor
Copy link
Author

negezor commented Sep 2, 2018

This has not been fixed, as before, when the function is used, fatal errors occur on the components.

TypeError: Cannot read property '$ssrContext' of undefined
 at Component.options.data (website/app/.nuxt/utils.js:34:0)
 at createFakeInstance (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:148:23)
 at Promise (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:32:16)
 at new Promise (<anonymous>)
 at walkTree (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:30:10)
 at Promise.all.components.map.component (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:24:33)
 at Array.map (<anonymous>)
 at Object.exports.getQueriesFromTree (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:24:16)
 at Object.exports.prefetchAll (C:\Users\negezor\projects\test-conflict\node_modules\vue-apollo\ssr\index.js:15:18)
 at beforeNuxtRender (website/app/.nuxt/apollo-module.js:94:0)
 at promisify (website/app/.nuxt/utils.js:232:0)
 at Promise.all.ssrContext.beforeRenderFns.map.fn (website/app/.nuxt/server.js:80:0)
 at Array.map (<anonymous>)
 at beforeRender (website/app/.nuxt/server.js:80:0)
 at module.exports.../website/app/.nuxt/server.js.__webpack_exports__.default (website/app/.nuxt/server.js:256:0)
 at process._tickCallback (internal/process/next_tick.js:68:7)

@Akryum
Copy link
Member

Akryum commented Sep 3, 2018 via email

@negezor
Copy link
Author

negezor commented Sep 4, 2018

Of course, here's the simplest example.

@Akryum
Copy link
Member

Akryum commented Sep 8, 2018

Fixed in latest beta.

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

4 participants