question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

quasar new store is creating vuex stores instead of pinia stores

See original GitHub issue

What happened?

After creating a new Quasar App (npm init quasar) with pinia as state management, using quasar new store <storeName> a new vuex store is created instead of a pinia store. Additionally the counterStore created at project initialization with npm init quasar is not usable.

What did you expect to happen?

quasar new store <storeName> should create a pinia store when used in a project created with pinia as state management

Reproduction URL

Can’t provide a URL

How to reproduce?

  1. npm init quasar
  2. Choose App with Quasar Cli
  3. Choose Quasar v2
  4. Choose Typescript
  5. Choose Quasar App CLI with Vite (But also tried with webpack but also didn’t work)
  6. Choose Composition API
  7. Add State Management (Pinia)
  8. quasar new store <storeName> creates a vuex store instead of a pinia sttore

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 - Windows_NT(10.0.19041) - win32/x64
NodeJs - 18.4.0

Global packages
  NPM - 8.12.1
  yarn - Not installed
  @quasar/cli - 1.3.2
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.7.5 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 1.0.5 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.15.0 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.2.37 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.1.2
  pinia - 2.0.16 -- Intuitive, type safe and flexible Store for Vue
  vuex - Not installed
  vite - 2.9.13 -- Native-ESM powered web dev build tool
  eslint - 8.20.0 -- An AST-based pattern checker for JavaScript.
  electron - Not installed
  electron-packager - Not installed
  electron-builder - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Relevant log output

>quasar new store mainStore

App • Generated src/store

App • Generated store: src\store\mainStore
App • Make sure to reference it in src/store/index.js

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tornadoskcommented, Oct 7, 2022

I can confirm that this issue still exists, just installed new quasar cli and created new project, no much coded added rather then initial setup, which was regular spa with pinia store, options selected was: npm, web-pack, and pinia with axios.

1reaction
Dekay21commented, Jul 22, 2022

Yes it happens on every project i created.

But I just tested this on a different computer and i can’t reproduce it myself. It seems my quasar/cli installation is faulty on the other computer or atleast some part of it, I will try to reinstall it completely to see if it works, but either way this problem seems to be resolved.

Thank you for taking your time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quasar - adding a Pinia Store creates a VUex store
The only solution I found is to add the path to stores in quasar. config. js: sourceFiles: { store: "src/stores/index", },
Read more >
App Vuex Store - Quasar Framework
Adding a Vuex Module is made easy by Quasar CLI through the $ quasar new command. ... It will create a folder in...
Read more >
Migrating from Vuex ≤4 - Pinia
The directory for Pinia is generally called stores instead of store . This is to emphasize that Pinia uses multiple stores, instead of...
Read more >
How to Migrate from Vuex to Pinia - Vue School Blog
src/store/modules/auth.js (Vuex) export default { namespaced: true, ... It's common convention to create Pinia stores in a directory called ...
Read more >
Pinia vs. Vuex: Which state management library is best for Vue?
We'll also look at new changes in Vuex 5 compared to Pinia 2. ... Instead, it allows you to create stores as you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found