Quasar CLI (Legacy)
quasar-cli is the command-line interface tool for scaffolding, developing, and building applications with Quasar Framework versions 0.x. It enables developers to create Vue-based projects targeting various platforms, including Single Page Applications (SPAs), Progressive Web Apps (PWAs), Server-Side Rendered (SSR) applications, hybrid mobile apps via Cordova, and desktop apps with Electron. This package, at version 0.17.26, represents an older, now abandoned, iteration of the Quasar CLI. The Quasar ecosystem has since transitioned to `@quasar/cli` for Quasar Framework versions 1.x and newer, offering improved features and updated dependencies. Due to its age, `quasar-cli` (0.x) contains known security vulnerabilities that have been addressed in modern Quasar CLI versions.
Common errors
-
webpack-dev-server 'Missing Origin Validation' vulnerability
cause Outdated `webpack-dev-server` dependency used by `quasar-cli` versions.fixUpgrade to a newer version of Quasar CLI (`@quasar/cli`) which includes updated `webpack-dev-server` versions or other security patches. (e.g., `webpack-dev-server` v3.1.14+ was released to address this). -
Error: quasar.conf > build > gzip: true breaks build
cause A bug in `quasar-cli@0.17.20` and possibly other `0.17.x` versions where enabling `gzip` in `quasar.conf.js` would cause the production build to fail.fixSet `gzip: false` in `quasar.conf.js` under the `build` section, or upgrade `quasar-cli` if a patch was released, or migrate to `@quasar/cli`. -
Dev on SSR gets stuck if ESLint reports any warning/error
cause During Server-Side Rendering (SSR) development, ESLint warnings or errors could halt the development server process in `quasar-cli@0.17.19`.fixEnsure all ESLint warnings and errors are resolved in your project before running `quasar dev` in SSR mode, or disable ESLint strict mode during development (though not recommended). Consider upgrading to a modern Quasar CLI where such issues are typically resolved. -
Installing electron bundle deps fails -- log() undefined
cause A specific bug in `quasar-cli@0.17.19` related to the Electron mode where dependency installation would fail due to an undefined `log()` function.fixUpdate `quasar-cli` to a version where this specific bug is fixed, or manually address the dependency installation for Electron if possible. The best long-term solution is to migrate to `@quasar/cli` for Electron app development.
Warnings
- breaking This specific package (`quasar-cli@0.x`) is an older, abandoned CLI version. It is incompatible with Quasar Framework v1+ projects. Attempting to use it with newer Quasar versions will lead to build failures or unexpected behavior.
- security Versions of `quasar-cli` 0.17.x (including 0.17.26) contain transitive dependencies with known vulnerabilities, such as `webpack-dev-server` (Missing Origin Validation), `webpack-bundle-analyzer`, and `lodash.template`. These issues have been addressed in newer, actively maintained versions of the Quasar CLI (`@quasar/cli`).
- breaking Minor versions of `quasar-cli@0.x` frequently introduced significant dependency updates (e.g., Webpack v4, Electron v3/v4, Quasar Framework v0.17.x, Workbox). These often included breaking changes, requiring manual adjustments to project configurations or code, particularly due to the 0.x semantic versioning where any minor version could introduce breaking changes.
- gotcha The `quasar.conf.js` build configuration options changed over time, for instance, `gzip: true` was known to break builds in some `0.17.x` versions, indicating potential configuration incompatibilities across minor updates.
Install
-
npm install quasar-cli -
yarn add quasar-cli -
pnpm add quasar-cli
Imports
- Quasar
import { Quasar } from 'quasar-cli'import { Quasar } from '@quasar/app' - cli
import cli from 'quasar-cli'
N/A (CLI is run via global command)
- dev
const { dev } = require('quasar-cli')N/A (CLI command: `quasar dev`)
Quickstart
npm install -g quasar-cli # Initialize a new Quasar v0.x project quasar init default my-quasar-app # Navigate into the new project directory cd my-quasar-app # Install project dependencies npm install # or yarn install # Start the development server (SPA mode) quasar dev # Build for production (SPA mode) quasar build