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

Quasar: vue/apollo-composable not working in SSR mode #1502

Open
cezaryszymanski opened this issue Aug 21, 2023 · 3 comments
Open

Quasar: vue/apollo-composable not working in SSR mode #1502

cezaryszymanski opened this issue Aug 21, 2023 · 3 comments

Comments

@cezaryszymanski
Copy link

Describe the bug
When trying to run Quasar application in SSR mode with vue/apollo-composable installed there is an error:

require() of ES Module /home/username/side/quasar-webpack/node_modules/@apollo/client/core/index.js from /home/username/side/quasar-webpack/node_modules/@vue/apollo-composable/dist/index.js not supported. Instead change the require of /home/username/side/quasar-webpack/node_modules/@apollo/client/core/index.js in /home/username/side/quasar-webpack/node_modules/@vue/apollo-composable/dist/index.js to a dynamic import() which is available in all CommonJS modules.

Error is thrown in node_modules/@vue/apollo-composable/dist/index.js:250

// src/util/toApolloError.ts
var import_core = __toModule(require("@apollo/client/core/index.js"));

Versions
vue: 3.3.4
@vue/apollo-composable: ^4.0.0-beta.8
@apollo/client: 3.8.1
quasar: 2.12.5

Additional context
When running in SPA mode everything works as expected

@Akryum
Copy link
Member

Akryum commented Sep 12, 2023

Try to use ESM version of @vue/apollo-composable

@gscpw
Copy link

gscpw commented Jan 25, 2024

Try to use ESM version of @vue/apollo-composable

Currently, there is no stable ESM version of Quasar framework AFAIK. So, it is impossible to use @vue/apollo-composable in any apps requiring SSR and running Quasar.

Quasar team is already aware of the issue and they claim this needs to be fixed in @vue/apollo-composable:
quasarframework/app-extension-apollo#137
quasarframework/app-extension-apollo#140

@Akryum Akryum changed the title vue/apollo-composable not working in SSR mode Quasar: vue/apollo-composable not working in SSR mode Jan 25, 2024
@Asxer
Copy link

Asxer commented May 8, 2024

Any updates on this?

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