Skip to content

Incorrect parameter passed to getPackageScriptPath in AppExtensionInstance #17823

@mnguyen284

Description

@mnguyen284

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions