Error in Quasar ssr with @vue/apollo-composable
Vue version
^3.0.0
Link to minimal reproduction
https://github.com/ipalestine/q-apollo-ssr
Steps to reproduce
npm install quasar dev -m ssr
What is expected?
works well
What is actually happening?
[vite] Error when evaluating SSR module /src/boot/apollo.js: Error [ERR_REQUIRE_ESM]: require() of ES Module D:\q-apollo-ssr\quasar-project\node_modules@apollo\client\core\index.js from D:\q-apollo-ssr\quasar-project\node_modules@vue\apollo-composable\dist\index.js not supported. Instead change the require of D:\q-apollo-ssr\quasar-project\node_modules@apollo\client\core\index.js in D:\q-apollo-ssr\quasar-project\node_modules@vue\apollo-composable\dist\index.js to a dynamic import() which is available in all CommonJS modules. at Object. (D:\q-apollo-ssr\quasar-project\node_modules@vue\apollo-composable\dist\index.js:259:30) at async Promise.all (index 0) at async nodeImport (D:\q-apollo-ssr\quasar-project\node_modules\vite\dist\node\chunks\dep-689425f3.js:50387:21) at async eval (/src/boot/apollo.js:5:31) at async instantiateModule (D:\q-apollo-ssr\quasar-project\node_modules\vite\dist\node\chunks\dep-689425f3.js:50317:9) D:\q-apollo-ssr\quasar-project\node_modules@vue\apollo-composable\dist\index.js:259 var import_core = __toModule(require("@apollo/client/core/index.js")); ^
Error [ERR_REQUIRE_ESM]: require() of ES Module D:\q-apollo-ssr\quasar-project\node_modules@apollo\client\core\index.js from D:\q-apollo-ssr\quasar-project\node_modules@vue\apollo-composable\dist\index.js not supported. Instead change the require of D:\q-apollo-ssr\quasar-project\node_modules@apollo\client\core\index.js in D:\q-apollo-ssr\quasar-project\node_modules@vue\apollo-composable\dist\index.js to a dynamic import() which is available in all CommonJS modules. at Object. (D:\q-apollo-ssr\quasar-project\node_modules@vue\apollo-composable\dist\index.js:259:30) at async Promise.all (index 0) at async nodeImport (D:\q-apollo-ssr\quasar-project\node_modules\vite\dist\node\chunks\dep-689425f3.js:50387:21) at async eval (/src/boot/apollo.js:5:31) at async instantiateModule (D:\q-apollo-ssr\quasar-project\node_modules\vite\dist\node\chunks\dep-689425f3.js:50317:9) { code: 'ERR_REQUIRE_ESM' }
System Info
System:
OS: Windows 10 10.0.19045
CPU: (2) x64 Intel(R) Pentium(R) CPU G3260 @ 3.30GHz
Memory: 1.96 GB / 7.93 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (111.0.1661.51)
Internet Explorer: 11.0.19041.1566
npmPackages:
vue: ^3.0.0 => 3.2.47
Any additional comments?
No response
This does not seem to be related to Vue core. If it is, please provide a minimal production without these huge dependencies.