You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When utilizing the built-in Pinia in Valaxy and referencing useExampleStore from stores/app.ts within a component, an error occurs. Specifically, in the development environment, if caching is not performed, the following error is encountered:
Uncaught (in promise) Error: [Valaxy] site config not properly injected in app
at useValaxyConfig (config.ts:64:11)
at useSiteConfig (config.ts:81:18)
at setup (App.vue:25:20)
at callWithErrorHandling (runtime-core.esm-bundler.js?v=9c7cd2b6:190:19)
at setupStatefulComponent (runtime-core.esm-bundler.js?v=9c7cd2b6:7594:25)
at setupComponent (runtime-core.esm-bundler.js?v=9c7cd2b6:7555:36)
at mountComponent (runtime-core.esm-bundler.js?v=9c7cd2b6:5886:7)
at processComponent (runtime-core.esm-bundler.js?v=9c7cd2b6:5852:9)
at patch (runtime-core.esm-bundler.js?v=9c7cd2b6:5318:11)
at render (runtime-core.esm-bundler.js?v=9c7cd2b6:6641:7)
Minimum Reproduction Steps
Create a stores/app.ts file under the theme directory.
Import and use useExampleStore in any Vue component (components directory .vue file) within the <script setup> block:
<scriptsetuplang="ts">import { useExampleStore } from'../stores/app'const store =useExampleStore()</script>
Observe the above error after initially starting the project or after updating npm packages, resetting cache.
Expected Behavior
Expect useExampleStore to work normally without causing errors, even without caching.
Actual Behavior
Upon initially starting the project or after updating npm packages, resetting cache, the aforementioned error occurs, indicating that the Valaxy site configuration was not correctly injected into the application.
Environment Information
Valaxy: ^0.18.5
Browser: Version 122.0.6261.57 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered:
Problem Description
When utilizing the built-in Pinia in Valaxy and referencing
useExampleStore
fromstores/app.ts
within a component, an error occurs. Specifically, in the development environment, if caching is not performed, the following error is encountered:Minimum Reproduction Steps
Create a
stores/app.ts
file under the theme directory.Add the following code to
stores/app.ts
:Import and use
useExampleStore
in any Vue component (components
directory.vue
file) within the<script setup>
block:Observe the above error after initially starting the project or after updating npm packages, resetting cache.
Expected Behavior
Expect
useExampleStore
to work normally without causing errors, even without caching.Actual Behavior
Upon initially starting the project or after updating npm packages, resetting cache, the aforementioned error occurs, indicating that the Valaxy site configuration was not correctly injected into the application.
Environment Information
The text was updated successfully, but these errors were encountered: