Pinia not initiating before boot files #14438
-
What happened?In my boot files (src/boot) I initialise Axios. Part of that initialisation draws on an entry from the Pinia store. Occasionally when running development mode (and only occasionally) I get the following error (seen so far with Electron, haven't been able to confirm with other types):
It stems from the
From the docs it seems like Pinia is initiated before the boot files (https://quasar.dev/quasar-cli/boot-files):
Could there be some sort of race condition? Does the boot file importing wait for the steps before to complete? What did you expect to happen?Pinia store to be initiated fully before calling the boot files. Reproduction URLCannot reproduce consistently How to reproduce?Cannot reproduce consistently FlavourQuasar CLI with Vite (@quasar/cli | @quasar/app-vite) AreasElectron Mode Platforms/BrowsersElectron Quasar info outputOperating System - Darwin(21.6.0) - darwin/arm64
NodeJs - 16.16.0
Global packages
NPM - 8.11.0
yarn - 3.2.2
@quasar/cli - 1.3.2
@quasar/icongenie - 2.5.3
cordova - Not installed
Important local packages
quasar - 2.8.3 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app-vite - 1.1.1 -- Quasar Framework App CLI with Vite
@quasar/extras - 1.15.3 -- Quasar Framework fonts, icons and animations
eslint-plugin-quasar - Not installed
vue - 3.2.38 -- The progressive JavaScript framework for building modern web UI.
vue-router - 4.1.5
pinia - 2.0.21 -- Intuitive, type safe and flexible Store for Vue
vuex - Not installed
vite - 2.9.15 -- Native-ESM powered web dev build tool
eslint - 8.23.0 -- An AST-based pattern checker for JavaScript.
electron - 20.1.0 -- Build cross platform desktop apps with JavaScript, HTML, and CSS
electron-packager - 15.5.2 -- Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI
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 Relevant log outputNo response Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @Maggie0002! 👋 It looks like you provided an invalid or unsupported reproduction URL. Without a proper reproduction, your issue will have to get closed. Thank you for your collaboration. 👏 |
Beta Was this translation helpful? Give feedback.
-
Check these: https://github.com/quasarframework/quasar/discussions?discussions_q=pinia+boot I think #13704 is what would help you |
Beta Was this translation helpful? Give feedback.
Check these: https://github.com/quasarframework/quasar/discussions?discussions_q=pinia+boot
I think #13704 is what would help you