Describe the bug
Upgrading to @quasar/app 1.4.3 makes the command quasar dev
fail.
Top error message after running the quasar dev
command is:
Error Unknown command «dev»
Tried to downgrade to @quasar/app^1.4.2
and app runs properly.
Codepen/jsFiddle/Codesandbox (required)
I don’t know how to set up this issue Codepen/jsFiddle/Codesandbox
To Reproduce
Steps to reproduce the behavior:
- Upgrade or create a fresh project with
@quasar/app^1.4.3
- Run
quasar dev
- Error Unknown command «dev»
Expected behavior
App should run in dev mode
Additional Info
What I’ve tried:
- Remove yarn.lock and node_modules (even .quasar on a different run) and reinstalled
- Cloned the repo again so it’s fresh
- Removed and installed @quasar/cli (both in npm and in yarn one instance a time)
- Weird thing is, I tried to run
quasar -v
in my terminal and it shows1.0.5
while when I ran it in my colleague’s terminal, it shows1.4.3
(after upgrade)
Before Upgrade
quasar info
Operating System - Windows_NT(10.0.18362) - win32/x64
NodeJs - 12.14.0
Global packages
NPM - 6.13.4
yarn - 1.19.1
@quasar/cli - 1.0.5
cordova - You have been opted out of telemetry. To change this, run: cordova telemetry on.
9.0.0 (cordova-lib@9.0.1)
Important local packages
quasar - 1.5.11 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app - 1.4.2 -- Quasar Framework local CLI
@quasar/extras - 1.3.3 -- Quasar Framework fonts, icons and animations
vue - 2.6.11 -- Reactive, component-oriented view layer for modern web interfaces.
vue-router - 3.1.3 -- Official router for Vue.js 2
vuex - 3.1.2 -- state management for Vue.js
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
@babel/core - 7.7.7 -- Babel compiler core.
webpack - 4.41.3 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e.
json, jsx, es7, css, less, ... and your custom stuff.
webpack-dev-server - 3.9.0 -- Serves a webpack app. Updates the browser on changes.
workbox-webpack-plugin - 4.3.1 -- A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
register-service-worker - 1.6.2 -- Script for registering service worker, with hooks
Quasar App Extensions
@quasar/quasar-app-extension-testing - 1.0.0 -- A Quasar App Extension for managing Test Harnesses
@quasar/quasar-app-extension-testing-unit-jest - 1.0.0 -- A Quasar App Extension for running Jest tests
@quasar/quasar-app-extension-icon-genie - 1.1.3 -- A Quasar CLI Extension for Making All Your Icons
After Upgrade to 1.4.3
quasar info
Operating System Windows_NT(10.0.18362) - win32/x64
NodeJs 12.14.0
Global packages
NPM 6.13.4
yarn 1.19.1
@quasar/cli 1.0.5
cordova You have been opted out of telemetry. To change this, run: cordova telemetry on.
9.0.0 (cordova-lib@9.0.1)
Networking
Host BGINNB057
Wi-Fi 192.168.1.178
quasar -version
Platform (please complete the following information):
OS: Windows 10
Node: 12.14.0
NPM: 6.13.4
Yarn: 1.19.1
Terminal: Powershell
Browsers: Chrome
What happened?
1 Updated global quasar CLI via npm
2. Created new project with default settings (but added axios, i18n, and state support)
3. See https://www.loom.com/share/945748d99f8a4083afd3451dd21b45a6 for the video
4. cd quasar-project
5. quasar mode add electron
6. Got the usual «Unknown command «mode»» error
What did you expect to happen?
Electron mode should be added. App should be runnable.
One thing I noticed — i have quasar.config.js , not quasar.conf.js — has this changed recently?
Reproduction URL
N/A
How to reproduce?
1 npm i -g @quasar/cli
2. Created new project with default settings (but added axios, i18n, and state support)
3. See https://www.loom.com/share/945748d99f8a4083afd3451dd21b45a6 for the video
4. cd quasar-project
5. quasar mode add electron
6. Got the usual «Unknown command «mode»» error
Flavour
Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)
Platforms/Browsers
Electron
Quasar info output
Operating System Windows_NT(10.0.19043) - win32/x64 NodeJs 16.14.0 Global packages NPM 7.14.0 yarn 1.22.10 @quasar/cli 1.1.3 @quasar/icongenie 2.4.0 cordova 10.0.0 Networking Host DESKTOP-VFDVA01 VirtualBox Host-Only Network 192.168.56.1 VirtualBox Host-Only Network #2 192.168.149.2 VirtualBox Host-Only Network #3 169.254.251.227 WiFi 192.168.0.30 vEthernet (WSL) 172.23.208.1
Relevant log output
PS C:dev> yarn create quasar yarn create v1.22.10 [1/4] Resolving packages... [2/4] Fetching packages... info @expo/ngrok-bin-darwin-arm64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-darwin-arm64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-darwin-arm64@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-darwin-x64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-darwin-x64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-freebsd-ia32@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-freebsd-ia32@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-freebsd-ia32@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-freebsd-x64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-freebsd-x64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-linux-arm@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-linux-arm@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-linux-arm@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-linux-arm64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-linux-arm64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-linux-arm64@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-linux-ia32@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-linux-ia32@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-linux-ia32@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-linux-x64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-linux-x64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-sunos-x64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-sunos-x64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-win32-ia32@2.3.40: The CPU architecture "x64" is incompatible with this module. info "@expo/ngrok-bin-win32-ia32@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "win32" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.3.2: The platform "win32" is incompatible with this module. info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.1.3: The platform "win32" is incompatible with this module. info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning "nativescript > marked-terminal@3.1.1" has incorrect peer dependency "marked@^0.4.0 || ^0.5.0". [4/4] Building fresh packages... success Installed "create-quasar@1.0.17" with binaries: - create-quasar .d88888b. d88P" "Y88b 888 888 888 888 888 888 8888b. .d8888b 8888b. 888d888 888 888 888 888 "88b 88K "88b 888P" 888 Y8b 888 888 888 .d888888 "Y8888b. .d888888 888 Y88b.Y8b88P Y88b 888 888 888 X88 888 888 888 "Y888888" "Y88888 "Y888888 88888P' "Y888888 888 Y8b √ What would you like to build? » App with Quasar CLI, let's go! √ Project folder: ... quasar-project √ Pick Quasar version: » Quasar v2 (Vue 3 | latest and greatest) √ Pick script type: » Javascript √ Pick Quasar App CLI variant: » Quasar App CLI with Webpack (stable) √ Package name: ... quasar-project √ Project product name: (must start with letter if building mobile apps) ... Quasar App √ Project description: ... A Quasar Project √ Author: ... Andrew Peacock <blakey@gmail.com> √ Pick your CSS preprocessor: » Sass with SCSS syntax √ Check the features needed for your project: » ESLint, State Management (Pinia), Axios, Vue-i18n √ Pick an ESLint preset: » Prettier Quasar • Generating files... - babel.config.js - quasar.config.js - README.md - .editorconfig - .gitignore - .postcssrc.js - jsconfig.json - package.json - public/favicon.ico - src/App.vue - src/index.template.html - .vscode/extensions.json - .vscode/settings.json - public/icons/favicon-128x128.png - public/icons/favicon-16x16.png - public/icons/favicon-32x32.png - public/icons/favicon-96x96.png - src/assets/quasar-logo-vertical.svg - src/boot/.gitkeep - src/components/EssentialLink.vue - src/layouts/MainLayout.vue - src/pages/ErrorNotFound.vue - src/pages/IndexPage.vue - src/router/index.js - src/router/routes.js - src/css/app.scss - src/css/quasar.variables.scss - src/boot/axios.js - src/boot/i18n.js - src/i18n/index.js - src/i18n/en-US/index.js - .eslintignore - .eslintrc.js - src/stores/example-store.js - src/stores/index.js - src/stores/store-flag.d.ts Quasar • SUCCESS • The project has been scaffolded √ Install project dependencies? (recommended) » Yes, use yarn yarn install v1.22.10 info No lockfile found. [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info fsevents@2.3.2: The platform "win32" is incompatible with this module. info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... warning " > @babel/eslint-parser@7.17.0" has unmet peer dependency "@babel/core@>=7.11.0". warning " > eslint-webpack-plugin@3.1.1" has unmet peer dependency "webpack@^5.0.0". Done in 36.28s. yarn run v1.22.10 $ eslint --ext .js,.vue ./ --fix Done in 2.45s.
Additional context
PS C:devquasar-project> node -v
v16.14.0
PS C:devquasar-project> npm -v
7.14.0
PS C:devquasar-project> yarn -v
1.22.10
Platform: windows 10
This topic has been deleted. Only users with topic management privileges can see it.
-
I’m trying to generate a build with the beta. more it generates errors.
I did the step by step in the documentation.
Am I doing something wrong?
npm install -g @quasar/cli
cd app-mobile
quasar dev$ quasar dev Dev mode.......... spa Pkg quasar........ v1.0.0-beta.18 Pkg @quasar/app... v1.0.0-beta.19 Debugging......... enabled app:quasar-conf Reading quasar.conf.js +0ms app:dev Checking listening address availability (0.0.0.0:8080)... +9ms app:webpack Extending SPA Webpack config +560ms app:generator Generating Webpack entry point +15ms app:dev-server Booting up... +5ms SPA █████████████████████████ [100%] in ~1s ERROR Failed to compile with 1 errors 01:46:47 error in ./.quasar/client-entry.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module '@babel/preset-stage-2' from '/Users/marcelo/Projeto/app-mobile' - sync.js:58 Function.module.exports [as sync] [app-mobile]/[resolve]/lib/sync.js:58:15 - plugins.js:101 resolveStandardizedName [app-mobile]/[@babel]/core/lib/config/files/plugins.js:101:31 - plugins.js:58 resolvePreset [app-mobile]/[@babel]/core/lib/config/files/plugins.js:58:10 - plugins.js:77 loadPreset [app-mobile]/[@babel]/core/lib/config/files/plugins.js:77:20 - config-descriptors.js:154 createDescriptor [app-mobile]/[@babel]/core/lib/config/config-descriptors.js:154:9 - config-descriptors.js:109 items.map [app-mobile]/[@babel]/core/lib/config/config-descriptors.js:109:50 - Array.map - config-descriptors.js:109 createDescriptors [app-mobile]/[@babel]/core/lib/config/config-descriptors.js:109:29 - config-descriptors.js:101 createPresetDescriptors [app-mobile]/[@babel]/core/lib/config/config-descriptors.js:101:10 - config-descriptors.js:47 presets [app-mobile]/[@babel]/core/lib/config/config-descriptors.js:47:19 @ multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./.quasar/client-entry.js
-
I’m using the pwa mode normally in the last version… by the console error:
Error: Cannot find module 'Error: Cannot find module '@babel/preset-stage-2' from '/Users/marcelo/Pro/app-mobile-cfc'' from '/Users/marcelo/Pro/app-mobile-cfc'
Did you confirmed if the@babel/preset-stage-2
is in yourpackage.json
? -
Your deps are messed up or you don’t use
.babel.config.js
. You should not have@babel/preset-stage-2
or equivalent in your deps as this comes with @quasar/app. -
The @quasar/app comes with npm install -g @ quasar/cli?
-
Does Not Work
-
“The @quasar/app comes with npm install -g @ quasar/cli?” —> No… please join our Discord server. You’re doing something wrong and it will be faster to determine what it is.
-
I’m doing this. A new project.
And it does not work.
What am I supposed to be doing wrong.
Is something more necessary?
npm install -g @quasar/cli
quasar create app-mobile -b dev
cd app-mobile
quasar dev -
@marcelo-delta if you could contact me right away on Discord we’ll sort this out faster.
-
I have the same problem. I can start the proyect with quasar dev. But when I import some components like QAvatar or QCard I have the same problem. I have an upgraded version of Babel but still not working
-
run
rm .babelrc
will fix this error
-
Hi @marcelo-delta I’m having the same issue, did you find a solution ?
I am just following the docs to set up a new project but quasar dev results in Unknown command “dev”.
Using quasar v1, node 8.9.4, npm 6.10.1
-
@tlloyduk reinstalling quasar and selecting the Yarn option during quasar create sorted this out for me. Seems it doesn’t like npm yet
-
After removing quasar cli, and installing @ qualsar / cli I get:
-
The solution was to install the latest version of node 10.16.1 LTS, reinstalled the CLI and everything started to work correctly.
-
I have same problem
Windows 10
Node js Version v12.18.4 * 64 bitlast time i remove my node module and re-install node module. but still inproblem
-
@rstoenescu can i take some help ?
-
@thiwankaSL use yarn for local deps as suggested.
-
what is the reason for this case? installed windows 10 last Night and after installation i clone project from git repository and npm install and quasar cli also install globally . after faced this issue . what is the reason and how i resolve this error . let me know .
-
@thiwankaSL
You are not following the advice of @metalsadman: using yarn for project dependencies. Don’t expect people to help you when you ignore their posts.
What happened?
1 Updated global quasar CLI via npm
2. Created new project with default settings (but added axios, i18n, and state support)
3. See https://www.loom.com/share/945748d99f8a4083afd3451dd21b45a6 for the video
4. cd quasar-project
5. quasar mode add electron
6. Got the usual «Unknown command «mode»» error
What did you expect to happen?
Electron mode should be added. App should be runnable.
One thing I noticed — i have quasar.config.js , not quasar.conf.js — has this changed recently?
Reproduction URL
N/A
How to reproduce?
1 npm i -g @quasar/cli
2. Created new project with default settings (but added axios, i18n, and state support)
3. See https://www.loom.com/share/945748d99f8a4083afd3451dd21b45a6 for the video
4. cd quasar-project
5. quasar mode add electron
6. Got the usual «Unknown command «mode»» error
Flavour
Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)
Platforms/Browsers
Electron
Quasar info output
Operating System Windows_NT(10.0.19043) - win32/x64 NodeJs 16.14.0 Global packages NPM 7.14.0 yarn 1.22.10 @quasar/cli 1.1.3 @quasar/icongenie 2.4.0 cordova 10.0.0 Networking Host DESKTOP-VFDVA01 VirtualBox Host-Only Network 192.168.56.1 VirtualBox Host-Only Network #2 192.168.149.2 VirtualBox Host-Only Network #3 169.254.251.227 WiFi 192.168.0.30 vEthernet (WSL) 172.23.208.1
Relevant log output
PS C:dev> yarn create quasar yarn create v1.22.10 [1/4] Resolving packages... [2/4] Fetching packages... info @expo/ngrok-bin-darwin-arm64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-darwin-arm64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-darwin-arm64@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-darwin-x64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-darwin-x64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-freebsd-ia32@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-freebsd-ia32@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-freebsd-ia32@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-freebsd-x64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-freebsd-x64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-linux-arm@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-linux-arm@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-linux-arm@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-linux-arm64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-linux-arm64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-linux-arm64@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-linux-ia32@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-linux-ia32@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-linux-ia32@2.3.40: The CPU architecture "x64" is incompatible with this module. info @expo/ngrok-bin-linux-x64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-linux-x64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-sunos-x64@2.3.40: The platform "win32" is incompatible with this module. info "@expo/ngrok-bin-sunos-x64@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info @expo/ngrok-bin-win32-ia32@2.3.40: The CPU architecture "x64" is incompatible with this module. info "@expo/ngrok-bin-win32-ia32@2.3.40" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "win32" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.3.2: The platform "win32" is incompatible with this module. info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.1.3: The platform "win32" is incompatible with this module. info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning "nativescript > marked-terminal@3.1.1" has incorrect peer dependency "marked@^0.4.0 || ^0.5.0". [4/4] Building fresh packages... success Installed "create-quasar@1.0.17" with binaries: - create-quasar .d88888b. d88P" "Y88b 888 888 888 888 888 888 8888b. .d8888b 8888b. 888d888 888 888 888 888 "88b 88K "88b 888P" 888 Y8b 888 888 888 .d888888 "Y8888b. .d888888 888 Y88b.Y8b88P Y88b 888 888 888 X88 888 888 888 "Y888888" "Y88888 "Y888888 88888P' "Y888888 888 Y8b √ What would you like to build? » App with Quasar CLI, let's go! √ Project folder: ... quasar-project √ Pick Quasar version: » Quasar v2 (Vue 3 | latest and greatest) √ Pick script type: » Javascript √ Pick Quasar App CLI variant: » Quasar App CLI with Webpack (stable) √ Package name: ... quasar-project √ Project product name: (must start with letter if building mobile apps) ... Quasar App √ Project description: ... A Quasar Project √ Author: ... Andrew Peacock <blakey@gmail.com> √ Pick your CSS preprocessor: » Sass with SCSS syntax √ Check the features needed for your project: » ESLint, State Management (Pinia), Axios, Vue-i18n √ Pick an ESLint preset: » Prettier Quasar • Generating files... - babel.config.js - quasar.config.js - README.md - .editorconfig - .gitignore - .postcssrc.js - jsconfig.json - package.json - public/favicon.ico - src/App.vue - src/index.template.html - .vscode/extensions.json - .vscode/settings.json - public/icons/favicon-128x128.png - public/icons/favicon-16x16.png - public/icons/favicon-32x32.png - public/icons/favicon-96x96.png - src/assets/quasar-logo-vertical.svg - src/boot/.gitkeep - src/components/EssentialLink.vue - src/layouts/MainLayout.vue - src/pages/ErrorNotFound.vue - src/pages/IndexPage.vue - src/router/index.js - src/router/routes.js - src/css/app.scss - src/css/quasar.variables.scss - src/boot/axios.js - src/boot/i18n.js - src/i18n/index.js - src/i18n/en-US/index.js - .eslintignore - .eslintrc.js - src/stores/example-store.js - src/stores/index.js - src/stores/store-flag.d.ts Quasar • SUCCESS • The project has been scaffolded √ Install project dependencies? (recommended) » Yes, use yarn yarn install v1.22.10 info No lockfile found. [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info fsevents@2.3.2: The platform "win32" is incompatible with this module. info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... warning " > @babel/eslint-parser@7.17.0" has unmet peer dependency "@babel/core@>=7.11.0". warning " > eslint-webpack-plugin@3.1.1" has unmet peer dependency "webpack@^5.0.0". Done in 36.28s. yarn run v1.22.10 $ eslint --ext .js,.vue ./ --fix Done in 2.45s.
Additional context
PS C:devquasar-project> node -v
v16.14.0
PS C:devquasar-project> npm -v
7.14.0
PS C:devquasar-project> yarn -v
1.22.10
Platform: windows 10
Following the instructions:
npm i -g @quasar/cli
npm i
quasar dev -m electron
I got error:
Error Unknown command "dev"
___
/ _ _ _ __ _ ___ __ _ _ __
| | | | | | |/ _` / __|/ _` | '__|
| |_| | |_| | (_| __ (_| | |
___\__,_|__,_|___/__,_|_|
Running @quasar/cli v1.0.0
Providing an answer here for anyone else who comes across this:
Typically this happens because the current project is not a Quasar project, is not installed or needs upgrading. The quasar
command will show different options depending on whether you in a Quasar project or not. A
Steps to try, if you believe this should be a valid Quasar project folder:
- Ensure the project dependencies are installed:
yarn install
- If still no luck, then you can try upgrading:
quasar upgrade
This has worked for me in the past. Good luck.
I tried running yarn install
and npm install
before executing quasar dev
@Akash-Preet did you run quasar upgrade
again following the yarn install
, since the first time it yielded an error.
@Akash-Preet let us know if you are still running across this error. We just did a major version update so you might want to consider moving over to OverVue 2.0. I can look into this issue as well but it seems like @ajmas gave a good response.
common mistake is when you aren’t in the currently directory where you istalled. so you should enter to the proyect just then run «quasar dev»
after installing @quasar/app
& @quasar/extras
worked again for me.
Содержание
- Fails to run quasar dev on @quasar/app 1.4.3 #5970
- Comments
- Quasar there was an error
- client-entry.js not found after upgrade to latest version #4835
- Comments
- Quasar there was an error
- Quasar there was an error
Fails to run quasar dev on @quasar/app 1.4.3 #5970
Describe the bug
Upgrading to @quasar/app 1.4.3 makes the command quasar dev fail.
Top error message after running the quasar dev command is:
Tried to downgrade to @quasar/app^1.4.2 and app runs properly.
Codepen/jsFiddle/Codesandbox (required)
I don’t know how to set up this issue Codepen/jsFiddle/Codesandbox
To Reproduce
Steps to reproduce the behavior:
- Upgrade or create a fresh project with @quasar/app^1.4.3
- Run quasar dev
- Error Unknown command «dev»
Expected behavior
App should run in dev mode
Additional Info
- Remove yarn.lock and node_modules (even .quasar on a different run) and reinstalled
- Cloned the repo again so it’s fresh
- Removed and installed @quasar/cli (both in npm and in yarn one instance a time)
- Weird thing is, I tried to run quasar -v in my terminal and it shows 1.0.5 while when I ran it in my colleague’s terminal, it shows 1.4.3 (after upgrade)
After Upgrade to 1.4.3
Platform (please complete the following information):
OS: Windows 10
Node: 12.14.0
NPM: 6.13.4
Yarn: 1.19.1
Terminal: Powershell
Browsers: Chrome
The text was updated successfully, but these errors were encountered:
Источник
Quasar there was an error
Whilst running Jest unit tests on a fresh install of Quasar and @quasar/testing, the following error is being logged to the console:
For some reason, vue-jest is not in the node-modules folder.
After installing vue-jest, the following error is thrown:
After installing babel-jest, an error is thrown that begins with ERROR: Cannot find module ‘babel-core’
The commands that I executed to set up this fresh install were as follows:
SELECT: All defaults
SELECT: Jest Unit Testing
SELECT: Overwrite babel.config.js and use additional .babelrc
SELECT: SFC webpack loader
SELECT: extra “scripts” in your package.json
Same problem occurs with yarn test:unit
@nothingismagick I have now checked this on a second computer and the same issue persists.
So I assume you are running this within a quasar 1.0 beta package, no? What does quasar info tell you when you run it within your project directory?
@nothingismagick quasar info on a fresh install of quasar and @quasar/testing with Jest outputs the following:
Please update your @quasar/cli global.
If that doesn’t work, I am at a bit of a loss, because in all of the windows tests that we ran before promoting uni-jest to beta there was never a problem. Are you running this within a lerna monorepo? Are you installing with yarn or npm?
Here is the transform that we currently deliver:
/jest.config.js
I’m installing with yarn and I don’t know what a lerna monorepo is.
I have tried updating the CLI with yarn upgrade global @quasar/cli
The result is the same. I have also tried this on my Macbook and it was the same result.
For whatever reason, vue-jest and babel-jest are there in the transform section but are not present in the node_modules folder.
Ok, I will try to replicate your problems.
I am not sure WHY this is happening all of the sudden, but can confirm. Thankyou for reporting. Please try this in your jest.config.js file:
After the change, this is what you should see:
@nothingismagick yes, that did the trick. Glad I can be of help!
Ok great. I will push beta.7 momentarily, but will continue digging in to figure out WHY these modules aren’t being installed in the consuming project all of the sudden.
@Jezzta667 — and then suddenly the fix stopped working. I am not sure what is going on, but my hunch is that the NPM servers are being flaky. I have refactored the transform to match the suggested approach, but left your solution “commented out”. For the time being this is the best I can do.
Источник
client-entry.js not found after upgrade to latest version #4835
I just upgraded from v1.0.0-beta.26 to latest using quasar upgrade -i , everything seemed to work fine. Now building my app fails with
Full copy/paste of the error:
This error happens without any changes to the code itself, the only change was the quasar upgrade . I’ve confirmed that /usr/src/client/.quasar/client-entry.js is the correct path and it is there. I’ve already tried removing node_modules and yarn.lock and reinstalling.
Any help is greatly appreciated
The text was updated successfully, but these errors were encountered:
Have you also tried deleting the .quasar folder?
@panstromek no I haven’t, I’ll give that a shot when I get back to my computer
@panstromek So I tried removing just the .quasar directory, and got the same error. Then I removed all three ( node_modules , .quasar and yarn.lock ) and I didn’t get the error (I guess that’s good news). Now I’m getting more errors that look like this:
quasar-variables’; client_1 | —————-^ client_1 | 133| client_1 | 134| .storiesContainer client_1 | 135| padding: 0 10% client_1 | failed to locate @import file
Update: Commenting out all instances of @import ‘
quasar-variables’; fixed it for now and the app was able to build. I’ll still need those quasar-variables though
@nothingismagick thanks, I’ll remove those imports then
This needs to be in a FAQ
Sorry to open this up but I am having the same issue:
We mothballed a Quasar project in early April and came back to it Friday. I ran the upgrade from v1.0.0-beta.3 and when I attempt to build out the project, I get the client-entry.js dependency not found. I had also tried deleting the node_modules , .quasar and yarn.lock files and ran the upgrade again without prevail. We’re pretty much stumped — All was building fine until after running the upgrade.
NOTE: We are not using any of the
quasar-variables so that’s not an issue for us.
Also, I noticed that the client-entry.js file is re-writing with every build command — even w/o any changed to any other of the files.
Any help and leads will be greatly appreciated. Thnx!
@CelticParser delete node_modules and yarn.lock/package-lock.json then yarn/npm install again.
That’s what I had said I done in my comment above — I had done it twice as well. Anything else?
Please contact me on Discord. Will do a TeamViewer session with you. @CelticParser
try deleting node_modules , .quasar and package-lock.json as well if you have it, then try npm i and build again
TL;DR: I ran into this. Found that it was my own mistake. However, the error could definitely be more accurate to save time.
For fellow developers who might land here from a google search on the error:
Источник
Quasar there was an error
I was trying to build/ add plataform cordova app
I alredy updated cordova/quasar/npm/node
cordova -v
9.0.0 (cordova-lib@9.0.1)
quasar -v
2.0.8
npm -v
6.14.7
node -v
v14.8.0
if i try to use the comand “cordova create src-cordova org.cordova.quasar.app App_pelagem_gatos” it works
but the quasar build -m cordova -T android keep showing the same error.
someone have the same problem on latest versions?
tip: for windows use npm only for global packages and yarn for project packages
what does quasar info say?
the weird thing is that quasar info reports Global packages cordova — Not installed (that’s the global cordova cli not the lib). But you can run cordova just fine.
- You could try to remove cordova globally and reinstall. ( Quasar info should report that cordova is installed)
- Try node 12.x lts
- again: for windows use npm only for global packages and yarn for project packages.
@dobbel thanks dobbel, it works
i installed the Yarn
uninstalled cordova -g
and instaled cordova 10.0.0 and now it works
On the next day, the problem returns
i try to uninstall e and install the cordova again with no results
my coworker has the exact same problem on his PC
Down grade your node to 12 lts version.
@metalsadman i tryied it, it works right way, but when i came back to this project it stop working again
it works when i reinstall yarn.
that makes no sense.
i need to reinstall yarn every time ia want to use cordova (which i instaled with npm -g)
some one knows how quasar detect installations?
@tymons it’s just the nature of the beast working with npm sometimes, I personally don’t get deps problem since I’m mostly up to date in versions, if it does happen just do common trouble shooting, deleting node_module folder, lock files, and run yarn. Use npm for globals, and yarn for local deps.
Источник
Quasar there was an error
While trying to upgrade quasar on macOS PC, with quasar upgrade and quasar upgrade —install it is resulting in following error:
Note: I have installed quasar cli with npm, hence yarn package manager is not present.
I have exactly the same problem but on Windows 10. I also have installed Quasar with npm (as shown in the docs) and do not have yarn installed.
Is Quasar working with npm? If not, then why is not this mentioned in the docs?
I guess there might be some regression going on since @rstoenescu fixed something that seems related in 1.0.0-beta7 — https://github.com/quasarframework/quasar/releases/tag/%40quasar%2Fcli-v1.0.0-beta.7
Found the problem — there was an old yarn.lock file in the project dir and the quasar upgrade script checks for its existence in order to decide which packager to use.
Removed it and now everything works.
Sorry for the false alarm!
@ddenev glad that you figured it out
I am getting the same problem reported here but I used Yarn instead, to install Quasar. Removing yarn.lock file and install yarn again make no difference. Any ideas?
Yarn instead, to install Quasar.
No that’s not the recommended way:
npm for global packages -> quasar cli, vue cli, grunt cli , ect.
yarn for project packages -> quasar app ,quasar extra’s, everything in package.js under dependencies . Most of under devDependencies except cli’s.
Thank you for your answer @dobbel. I did what you suggested and it is working now.
Источник
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Quasar CLI with Webpack — @quasar/app-webpack
Familiarize yourself with the list of available commands inside a Quasar project:
$ quasar
Example usage
$ quasar <command> <options>
Help for a command
$ quasar <command> --help
$ quasar <command> -h
Options
--version, -v Print Quasar App CLI version
Commands
dev, d Start a dev server for your App
build, b Build your app for production
clean, c Clean all build artifacts
new, n Quickly scaffold page/layout/component/... vue file
mode, m Add/remove Quasar Modes for your App
inspect Inspect generated Webpack config
ext, e Manage Quasar App Extensions
run, r Run specific command provided by an installed
Quasar App Extension
describe Describe a Quasar API (component)
test, t Run @quasar/testing App Extension command
- requires @quasar/testing App Extension to be installed
- this is an alias command for convenience purposes
info, i Display info about your machine and your App
help, h Displays this message
If the specified command is not found, then "quasar run"
will be executed with the provided arguments.
Commands supplied by @quasar/cli global installation:
upgrade Check (and optionally) upgrade Quasar packages
from a Quasar project folder
serve Create an ad-hoc server on App's distributables
See help for any command:
$ quasar [command name] --help
Upgrade
Check (and optionally) upgrade Quasar packages from a Quasar project folder:
# view all options:
$ quasar upgrade -h
# checks for non-breaking change upgrades and displays them,
# but will not carry out the install
$ quasar upgrade
# checks for pre-releases (alpha/beta):
$ quasar upgrade -p
# checks for major new releases (includes breaking changes):
$ quasar upgrade -m
# to perform the actual upgrade,
# combine any of the params above and add "-i" (or "--install"):
$ quasar upgrade -i
Note for code editor terminals
If you’re using a code editor terminal instead of the real one, you run quasar upgrade
and get an error Command not found or @quasar/cli version appears to be undefined, you will need to go to the settings of your code editor terminal and untick the option (or its equivalent) Add ‘node_modules/.bin’ from the project root to %PATH% then restart your code editor.
Info
The Quasar CLI is equipped with a stable combination of multiple NPM build packages (Webpack, Vue, etc) which gets updated frequently after heavy testing.
In order for you to see what versions of Node, Quasar CLI, Quasar, Vue (and many others) you are using, issue this command in a Quasar project folder:
$ quasar info
Dev
$ quasar dev -h
Description
Starts the app in development mode (hot-code reloading, error
reporting, etc)
Usage
$ quasar dev
$ quasar dev -p <port number>
$ quasar dev -m ssr
# alias for "quasar dev -m cordova -T ios"
$ quasar dev -m ios
# alias for "quasar dev -m cordova -T android"
$ quasar dev -m android
# passing extra parameters and/or options to
# underlying "cordova" or "electron" executables:
$ quasar dev -m ios -- some params --and options --here
$ quasar dev -m electron -- --no-sandbox --disable-setuid-sandbox
# when on Windows and using Powershell:
$ quasar dev -m ios '--' some params --and options --here
$ quasar dev -m electron '--' --no-sandbox --disable-setuid-sandbox
Options
--mode, -m App mode [spa|ssr|pwa|bex|cordova|capacitor|electron] (default: spa)
--port, -p A port number on which to start the application
--hostname, -H A hostname to use for serving the application
--help, -h Displays this message
Only for Cordova mode:
--target, -T (required) App target
[android|ios]
--emulator, -e (optional) Emulator name
Examples: iPhone-7, iPhone-X
iPhone-X,com.apple.CoreSimulator.SimRuntime.iOS-12-2
--ide, -i Open IDE (Android Studio / XCode) instead of letting Cordova
booting up the emulator, in which case the "--emulator"
param will have no effect
--devtools, -d Open remote Vue Devtools
Only for Capacitor mode:
--target, -T (required) App target
[android|ios]
The Quasar development server allows you to develop your App by compiling and maintaining code in-memory. A web server will serve your App while offering hot-reload out of the box. Running in-memory offers faster rebuilds when you change your code.
Hot Reload is much more than just refreshing your browser when code changes. It skips the refresh and updates your code on the fly, while maintaining your App’s state (like your Vue’s model data). Please note that there are cases when this is impossible, so the dev webserver will simply refresh your browser. (Always ensure you are running only one instance of Quasar CLI at a time, otherwise Hot-Reload and other stuff will break!)
Based on what you want to develop, you can start the development server by using “quasar dev” command as follows:
# Developing a SPA
$ quasar dev
# ...or
$ quasar dev -m spa
# Developing for SSR
$ quasar dev -m ssr
# Developing a PWA
$ quasar dev -m pwa
# Developing a BEX for production
$ quasar dev -m bex
# Developing a Mobile App (through Cordova)
$ quasar dev -m cordova -T [android|ios]
# or the short form:
$ quasar dev -m [android|ios]
# Developing an Electron App
$ quasar dev -m electron
# Developing a Browser Extension (BEX)
$ quasar dev -m bex
# passing extra parameters and/or options to
# underlying "cordova" or "electron" executables:
$ quasar dev -m ios -- some params --and options --here
$ quasar dev -m electron -- --no-sandbox --disable-setuid-sandbox
# when on Windows and using Powershell:
$ quasar dev -m ios '--' some params --and options --here
$ quasar dev -m electron '--' --no-sandbox --disable-setuid-sandbox
If you wish to change the hostname or port serving your App you have 3 options:
- Edit ‘/quasar.config.js’:
devServer: { host: '...', port: ... }
- Through ‘-H’ (hostname) and ‘-p’ (port) command options.
- If this is a one time thing, specify the hostname and/or port as an environment variable:
$ PORT=3000 quasar dev $ HOSTNAME=1.1.1.14 quasar dev
If there appears to be an issue with hot reload, you can try two fixes:
-
Change the permissions for the project folder with
sudo chown -R username: .
-
or run the dev server with root privileges
sudo quasar dev
Build
$ quasar build -h
Description
Builds distributables of your app.
Usage
$ quasar build
$ quasar build -p <port number>
$ quasar build -m ssr
# alias for "quasar build -m cordova -T ios"
$ quasar build -m ios
# alias for "quasar build -m cordova -T android"
$ quasar build -m android
# passing extra parameters and/or options to
# underlying "cordova" executable:
$ quasar build -m ios -- some params --and options --here
# when on Windows and using Powershell:
$ quasar build -m ios '--' some params --and options --here
Options
--mode, -m App mode [spa|ssr|pwa|bex|cordova|capacitor|electron] (default: spa)
--target, -T App target
- Cordova (default: all installed)
[android|ios]
- Capacitor
[android|ios]
- Electron with default "electron-packager" bundler (default: yours)
[darwin|win32|linux|mas|all]
- Electron with "electron-builder" bundler (default: yours)
[darwin|mac|win32|win|linux|all]
--publish, -P Also trigger publishing hooks (if any are specified)
- Has special meaning when building with Electron mode and using
electron-builder as bundler
--debug, -d Build for debugging purposes
--skip-pkg, -s Build only UI (skips creating Cordova/Capacitor/Electron executables)
- Cordova (it only fills in /src/cordova/www folder with the UI code)
- Capacitor (it only fills in /src/capacitor/www folder with the UI code)
- Electron (it only creates the /dist/electron/UnPackaged folder)
--help, -h Displays this message
ONLY for Cordova and Capacitor mode:
--ide, -i Open IDE (Android Studio / XCode) instead of finalizing with a
terminal/console-only build
ONLY for Electron mode:
--bundler, -b Bundler (electron-packager or electron-builder)
[packager|builder]
--arch, -A App architecture (default: yours)
- with default "electron-packager" bundler:
[ia32|x64|armv7l|arm64|mips64el|all]
- with "electron-builder" bundler:
[ia32|x64|armv7l|arm64|all]
ONLY for electron-builder (when using "publish" parameter):
--publish, -P Publish options [onTag|onTagOrDraft|always|never]
- see https://www.electron.build/configuration/publish
The Quasar CLI can pack everything together and optimize your App for production. It minifies source code, extracts vendor components, leverages browser cache and much more.
# Build a SPA for production
$ quasar build
# ...or
$ quasar build -m spa
# Build a SSR for production
$ quasar build -m ssr
# Build a PWA for production
$ quasar build -m pwa
# Build a BEX for production
$ quasar build -m bex
# Build a Mobile App (through Cordova)
$ quasar build -m cordova -T [android|ios]
# or the short form:
$ quasar build -m [android|ios]
# Build an Electron App for production
$ quasar build -m electron
# passing extra parameters and/or options to
# underlying "cordova" executable:
$ quasar build -m ios -- some params --and options --here
# when on Windows and using Powershell:
$ quasar build -m ios '--' some params --and options --here
# Create a production build with ability to debug it
# (has source-maps and code is NOT minified)
$ quasar build -d [-m <mode>]
Clean
Cleans up all the build assets:
$ quasar clean
New
Generates Components, Pages, Layouts, Vuex Store.
TIP
This command is simply a helper in order to quickly scaffold a page/layout/component/vuex store module. You are not required to use it, but can help you when you don’t know how to start.
$ quasar new -h
Description
Quickly scaffold files.
Usage
$ quasar new <p|page> [-f <option>] <page_file_name>
$ quasar new <l|layout> [-f <option>] <layout_file_name>
$ quasar new <c|component> [-f <option>] <component_file_name>
$ quasar new <b|boot> [-f ts] <boot_name>
$ quasar new <s|store> [-f ts] <store_module_name>
$ quasar new ssrmiddleware [-f ts] <middleware_name>
Examples
# Create src/pages/MyNewPage.vue:
$ quasar new p MyNewPage
# Create src/pages/MyNewPage.vue and src/pages/OtherPage.vue:
$ quasar new p MyNewPage OtherPage
# Create src/layouts/shop/Checkout.vue
$ quasar new layout shop/Checkout.vue
# Create src/layouts/shop/Checkout.vue with TypeScript options API
$ quasar new layout -f ts-options shop/Checkout.vue
# Create a store with TypeScript (-f ts is optional if tsconfig.json is present)
$ quasar new store -f ts myStore
Options
--help, -h Displays this message
--format -f <option> (optional) Use a supported format for the template
Possible values:
* default - Default JS template
* ts-composition - TS composition API (default if using TS)
* ts-composition-setup - TS composition API with <script setup>
* ts-options - TS options API
* ts-class - [DEPRECATED] TS class style syntax
* ts - Plain TS template (for boot, store, and ssrmiddleware files)
Mode
$ quasar mode -h
Description
Add/Remove support for PWA / BEX / Cordova / Capacitor / Electron modes.
Usage
$ quasar mode [add|remove] [pwa|ssr|bex|cordova|capacitor|electron] [--yes]
# determine what modes are currently installed:
$ quasar mode
Options
--yes, -y Skips the "Are you sure?" question
when removing a Quasar mode
--help, -h Displays this message
When you initialize a project with the CLI, you can build SPA (Single Page Website/Application), SSR (Server-side Render Website/Application with optional PWA client takeover), PWA (Progressive Web App), Mobile App (through Cordova), and/or Electron Apps. When you develop for SSR, PWA, Cordova or Electron, you need these modes installed. If you issue “quasar dev” or “quasar build” they will automatically be installed.
These modes will add a “src-*” folder into your project with very specific code for it:
Folder | Mode | Description |
---|---|---|
src-ssr | ssr | Contains the production Node server files. |
src-pwa | pwa | Contains the Service Worker file that you can tweak. |
src-cordova | cordova | Is a Cordova project folder that will be using your ‘src’ as content. Tweak Cordova config, add/remove platforms, splash screens, Cordova plugins and so on from this folder. Do NOT touch “src-cordova/www” folder though as it will get overwritten at every build. |
src-electron | electron | Has code for the main Electron thread. The renderer thread will be your app in ‘src’. |
src-bex | bex | Contains the specific files for Browser Extensions mode. |
If for some reason you decide you don’t need a mode, you can remove it. This will permanently delete the respective “src-*” folder.
$ quasar mode remove pwa
Describe
This command is useful to describe the API of any Quasar components/directives/plugins that your project is using. It is specific to your Quasar version installed in your project folder.
Examples: $ quasar describe QIcon
, $ quasar describe TouchPan
, $ quasar describe Cookies
.
$ quasar describe -h
Description
Describes a component API for project's Quasar version being used
Usage
$ quasar describe <component/directive/Quasar plugin>
# display everything:
$ quasar describe QIcon
# displaying only props:
$ quasar describe QIcon -p
# displaying props and methods only:
$ quasar describe QIcon -p -m
# filtering by "si":
$ quasar describe QIcon -f si
# filtering only props by "co":
$ quasar describe QIcon -p -f co
# Open docs URL:
$ quasar describe QIcon -d
Options
--filter, -f <filter> Filters the API
--props, -p Displays the API props
--slots, -s Displays the API slots
--methods, -m Displays the API methods
--events, -e Displays the API events
--value, -v Displays the API value
--arg, -a Displays the API arg
--modifiers, -M Displays the API modifiers
--injection, -i Displays the API injection
--quasar, -q Displays the API quasar conf options
--help, -h Displays this message
$ quasar describe QIcon
Describing QIcon component API
Description is based on your project's Quasar version
Properties
name (String)
Description: Name of the icon, following Quasar convention
Examples:
map
ion-add
color (String)
Description: Color name for component from the Quasar Color Palette
Examples:
primary
teal-10
size (String)
Description: Size in CSS units, including unit name
Examples:
16px
2rem
left (Boolean)
Description: Apply a standard margin on the left side. Useful if icon is on the right side of something.
right (Boolean)
Description: Apply a standard margin on the right side. Useful if icon is on the left side of something.
Slots
default
Suggestions: QTooltip or QMenu
Scoped Slots
*No scoped slots*
Events
*No events*
Methods
*No methods*
Inspect
This command can be used to inspect the Webpack config generated by Quasar CLI.
$ quasar inspect -h
Description
Inspect Quasar generated Webpack config
Usage
$ quasar inspect
$ quasar inspect -c build
$ quasar inspect -m electron -p 'module.rules'
Options
--cmd, -c Quasar command [dev|build] (default: dev)
--mode, -m App mode [spa|ssr|pwa|bex|cordova|electron] (default: spa)
--depth, -d Number of levels deep (default: 5)
--path, -p Path of config in dot notation
Examples:
-p module.rules
-p plugins
--help, -h Displays this message
Ext
This command is used to manage App Extensions.
$ quasar ext -h
Description
Manage Quasar App Extensions
Usage
# display list of installed extensions
$ quasar ext
# Add Quasar App Extension
$ quasar ext add <ext-id>
# Remove Quasar App Extension
$ quasar ext remove <ext-id>
# Add Quasar App Extension, but
# skip installing the npm package
# (assumes it's already installed)
$ quasar ext invoke <ext-id>
# Remove Quasar App Extension, but
# skip uninstalling the npm package
$ quasar ext uninvoke <ext-id>
Options
--help, -h Displays this message
Run
This command is used to run commands supplied by the App Extensions that you’ve installed into your project folder.
$ quasar run -h
Description
Run app extension provided commands
Usage
$ quasar run <extension-id> <cmd> [args, params]
$ quasar <extension-id> <cmd> [args, params]
$ quasar run iconify create pic -s --mark some_file
$ quasar iconify create pic -s --mark some_file
# Note: "iconify" is an example and not a real extension.
# Looks for installed extension called "iconify"
# (quasar-app-extension-iconify extension package)
# and runs its custom defined "create" command
# with "pic" argument and "-s --mark some_file" params
Options
--help, -h Displays this message
Serve
This command can be used in production too and it is being supplied by the global installation of @quasar/cli
package.
$ quasar serve -h
Description
Start a HTTP(S) server on a folder.
Usage
$ quasar serve [path]
$ quasar serve . # serve current folder
If you serve a SSR folder built with the CLI then
control is yielded to /index.js and params have no effect.
Options
--port, -p Port to use (default: 4000)
--hostname, -H Address to use (default: 0.0.0.0)
--gzip, -g Compress content (default: true)
--silent, -s Suppress log message
--colors Log messages with colors (default: true)
--open, -o Open browser window after starting
--cache, -c <number> Cache time (max-age) in seconds;
Does not apply to /service-worker.js
(default: 86400 - 24 hours)
--micro, -m <seconds> Use micro-cache (default: 1 second)
--history Use history api fallback;
All requests fallback to /index.html,
unless using "--index" parameter
--index, -i <file> History mode (only!) index url path
(default: index.html)
--https Enable HTTPS
--cert, -C [path] Path to SSL cert file (Optional)
--key, -K [path] Path to SSL key file (Optional)
--proxy <file.js> Proxy specific requests defined in file;
File must export Array ({ path, rule })
See example below. "rule" is defined at:
https://github.com/chimurai/http-proxy-middleware
--cors Enable CORS for all requests
--help, -h Displays this message
Proxy file example
module.exports = [
{
path: '/api',
rule: { target: 'http://www.example.org' }
}
]
--> will be transformed into app.use(path, httpProxyMiddleware(rule))
Custom Node server
When building a SPA or PWA, the distributable folder can be served by any static webserver. To test it out (assuming you don’t have a specific publicPath or not using Vue Router “history” mode), you can use the “http-server” npm package.
Or you can build your own server. Here are some examples:
// when using default Vue Router "hash" mode
const
express = require('express'),
serveStatic = require('serve-static'),
port = process.env.PORT || 5000
const app = express()
app.use(serveStatic(...path-to-dist...))
app.listen(port)
// when using Vue Router "history" mode
const
express = require('express'),
serveStatic = require('serve-static'),
history = require('connect-history-api-fallback'),
port = process.env.PORT || 5000
const app = express()
app.use(history())
app.use(serveStatic(...path-to-dist...))
app.listen(port)
If you need URL rewrites of API, or simply put you want to proxy your API requests, then you can use “http-proxy-middleware” package:
// add this to one of the two previous examples:
const { createProxyMiddleware } = require('http-proxy-middleware')
// ...
app.use('/api', createProxyMiddleware({
target: `http://my-api.com:5050`,
pathRewrite: {"^/api" : ""}
}))
// then app.listen(...)
Finally, run one of these files:
$ node my-server.js
Create
Creates a Quasar project (app, AppExtension or UI kit) from CUSTOM starter kits.
$ quasar create <folder_name> --kit <address> [--branch <branch_name>]
You can use a starter kit stored on your machine by providing a local path to a folder (eg. quasar create --kit ./my-custom-starter-kit
).
You can use a starter kit stored into any publicly accessible Git repository by providing a reference which follows this schema:
- GitHub —
github:owner/name
or simplyowner/name
- GitLab —
gitlab:owner/name
- Bitbucket —
bitbucket:owner/name
master
branch will be checked out by default, but you can specify the one you prefer via --branch <branch name>
(eg. quasar create --kit owner/name --branch my-branch
).
WARNING
The preferred way to build reusable code and UI Components into Quasar ecosystem are App Extensions. Use a custom starter kit only if you really know what you’re doing and be aware that it will make more difficult for the Quasar team to provide you assistance.