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

Incorrect parameter passed to getPackageScriptPath in AppExtensionInstance #17823

Open
mnguyen284 opened this issue Feb 12, 2025 · 1 comment

Comments

@mnguyen284
Copy link

mnguyen284 commented Feb 12, 2025

What happened?

In app-vite/lib/app-extension/AppExtensionInstance.js , the call to getPackageScriptPath has passed the extension path as the parameter but it should be app path instead. Resulting no extension script found.

#getScriptFile (scriptName) {
    if (this.isInstalled === false) return

    return getPackageScriptPath(
      this.packageFullName,
      scriptName,
      this.#packagePath
    )
  }

What did you expect to happen?

Code should be changed to

#getScriptFile (scriptName) {
    if (this.isInstalled === false) return

    return getPackageScriptPath(
      this.packageFullName,
      scriptName,
      this.#ctx.appPaths.appDir
    )
  }

Reproduction URL

https://jsfiddle.net/akptr8zx/1/

How to reproduce?

  1. Use yarn quasar create to create a new Quasar App.
  2. Use yarn quasar create to create a new Quasar App Extension.
  3. Link and invoke the extension in the app.
  4. Run yarn build in the app.
  5. There will be an error saying index script is missing.

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

Operating System - Darwin(24.2.0) - darwin/arm64
NodeJs - 22.13.1

Global packages
  NPM - 10.9.2
  yarn - 1.22.22
  pnpm - Not installed
  bun - Not installed
  @quasar/cli - 2.4.1
  @quasar/icongenie - 2.5.4
  cordova - Not installed

Important local packages
  quasar - 2.17.7 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 2.0.8 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.17 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.5.13 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.5.0
  pinia - 3.0.0 -- Intuitive, type safe and flexible Store for Vue
  vite - 6.1.0 -- Native-ESM powered web dev build tool
  vite-plugin-checker - Not installed
  eslint - 9.20.1 -- An AST-based pattern checker for JavaScript.
  esbuild - 0.24.2 -- An extremely fast JavaScript and CSS bundler and minifier.
  typescript - 5.7.3 -- TypeScript is a language for application scale JavaScript development
  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
  @motinet/quasar-app-extension-mnext - 0.0.1 -- A Quasar Project

Networking
  Host - Minhs-MacBook-Pro.local
  en0 - 192.168.1.190

Relevant log output

Additional context

No response

Copy link

Hi @mnguyen284! 👋

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. 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant