quasarframework / app-extension-apollo

The official Quasar App-Extension for Apollo and GraphQL - Currently Beta!
https://quasar.dev
111 stars 18 forks source link

Apollo AE Not Installing Correctly w/ Vite-Beta CLI #163

Closed adamkpurdy closed 6 months ago

adamkpurdy commented 7 months ago

What happened?

Created a new Quasar app with the Quasar App CLI with Vite 5 (BETA | next major version - v2), and installed packages via yarn. Then proceeded to install the Apollo AE via:

quasar ext add @quasar/apollo

Towards the end of the installation, an error was thrown: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

Here is the complete log:

❯ quasar ext add @quasar/apollo App • Installing "@quasar/apollo" Quasar App Extension

App • Installing @quasar/quasar-app-extension-apollo... App • [sync] Running "yarn add --dev @quasar/quasar-app-extension-apollo" in /Users/adampurdy/Sites/KPA_PRODUCTIONS/USSSA/web/vite-5-beta-ssr-apollo

yarn add v1.22.19 [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... [3/5] 🚚 Fetching packages... warning vscode-languageclient@7.0.0: The engine "vscode" appears to be invalid. [4/5] 🔗 Linking dependencies... warning " > vite-plugin-checker@0.6.4" has unmet peer dependency "vite@>=2.0.0". warning " > @quasar/quasar-app-extension-apollo@2.2.0" has unmet peer dependency "@apollo/client@^3.0.0". warning " > @quasar/quasar-app-extension-apollo@2.2.0" has unmet peer dependency "@vue/apollo-composable@^4.0.0". warning " > @quasar/quasar-app-extension-apollo@2.2.0" has unmet peer dependency "graphql@^15.0.0 || ^16.0.0". [5/5] 🔨 Building fresh packages... success Saved lockfile. success Saved 1 new dependency. info Direct dependencies └─ @quasar/quasar-app-extension-apollo@2.2.0 info All dependencies └─ @quasar/quasar-app-extension-apollo@2.2.0 ✨ Done in 1.76s. node:internal/errors:490 ErrorCaptureStackTrace(err); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:399:5) at validateString (node:internal/validators:163:11) at join (node:path:1172:7) at #getScriptFile (/vite-5-beta-ssr-apollo/node_modules/@quasar/app-vite/lib/app-extension/AppExtensionInstance.js:343:22) at #getScript (/vite-5-beta-ssr-apollo/node_modules/@quasar/app-vite/lib/app-extension/AppExtensionInstance.js:355:39) at #getScriptPrompts (/vite-5-beta-ssr-apollo/node_modules/@quasar/app-vite/lib/app-extension/AppExtensionInstance.js:303:51) at AppExtensionInstance.install (/vite-5-beta-ssr-apollo/node_modules/@quasar/app-vite/lib/app-extension/AppExtensionInstance.js:217:49) at async ***/vite-5-beta-ssr-apollo/node_modules/@quasar/app-vite/lib/cmd/ext.js:90:3 { code: 'ERR_INVALID_ARG_TYPE' }

Node.js v18.16.0

What did you expect to happen?

Successfully installing the Apollo AE

Reproduction URL

https://codepen.io/rstoenescu/pen/xxEvBLR

How to reproduce?

  1. yarn create quasar
  2. Select Quasar App CLI with Vite 5 (BETA | next major version - v2) for the Quasar App CLI variant
  3. Select yes to install dependencies with yarn
  4. After that is finished, install Quasar Apollo AE quasar ext add @quasar/apollo

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

No response

Quasar info output

quasar info

Operating System - Darwin(23.4.0) - darwin/arm64
NodeJs - 18.16.0

Global packages
  NPM - 9.5.1
  yarn - 1.22.19
  pnpm - 8.14.1
  bun - 1.0.3
  @quasar/cli - 2.4.0
  @quasar/icongenie - 2.5.4
  cordova - Not installed

Important local packages
  quasar - 2.15.3 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 2.0.0-beta.6 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.11 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.4.23 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.3.2
  pinia - Not installed
  vuex - Not installed
  vite - 5.2.9 -- Native-ESM powered web dev build tool
  vite-plugin-checker - Not installed
  eslint - 8.57.0 -- An AST-based pattern checker for JavaScript.
  esbuild - 0.20.2 -- An extremely fast JavaScript and CSS bundler and minifier.
  typescript - Not installed
  workbox-build - Not installed
  register-service-worker - Not installed
  electron - Not installed
  electron-packager - Not installed
  electron-builder - Not installed
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - Adams-MBP-USSSA.lan
  en0 - 192.168.1.157
  utun4 - 172.16.200.102

Relevant log output

No response

Additional context

This is a brand new app creation so I don't have any URL that would be in context. I needed to use the Vite-Beta version so I can get the Apollo extension to work correctly in SSR Mode. Currently, on the old Vite flavor there is an issue regarding the Apollo Client is not properly configured for ESM/CJS. @yusufkandemir suggested using the vite-beta, but then this issue arose, and he directed me to open an issue.

github-actions[bot] commented 7 months ago

Hi @adamkpurdy! 👋

It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, StackBlitz, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.

Without a proper reproduction, your issue will have to get closed.

Thank you for your collaboration. 👏

adamkpurdy commented 7 months ago

I added a generic URL to codepen so this doesn't get closed. The required URL is N/A I feel in the context of this issue.

smolinari commented 6 months ago

Moving to the Apollo AE repo.

Scott

rstoenescu commented 6 months ago

Fixed an issue with some node core functionality in q/app-vite beta (will release a new version today). Then pushed compat checks for this AE to handle the betas too.

smolinari commented 6 months ago

@adamkpurdy

v2.2.2 is released. Should install ok now.

Scott

adamkpurdy commented 6 months ago

@smolinari Thank you for the follow-up. I did have success installing the AE but when I went to run the app I am getting an error: Quasar App Extension "@quasar/apollo" is missing...

Screenshot 2024-04-25 at 9 43 48 AM
smolinari commented 6 months ago

@adamkpurdy - Oh boy. Sorry about that. I assumed it would work getting past that first error. Didn't test actually running the app.

Could you start a new issue please. Start it in this repo. It should be easier.

Scott

adamkpurdy commented 6 months ago

Yes sounds good