Using Nuxt2 and Pinia, I get errors when deploying. #2178
Unanswered
Yuisei-Maruyama
asked this question in
Help and Questions
Replies: 1 comment
-
Hi. I am interested in this topic because we also want to use Pinia in this form, but if it doesn't work in a production environment, it's not very good news. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Steps to reproduce the bug
Background
In my project, the application was built with NuxtJS v2 and Vuex as a method of state management.
I would like to implement Pinia in that application and replace Vuex with Pinia for state management.
So I decided to partially implement Pinia in our current application and gradually replace Vuex with Pinia.
Problems
In the operating environment described below, I am able to access the Pinia store and read out state management data in the local environment.
However, in the deployed environment, the error described in "Actual behavior" occurs.
Application Environment
In my project environment are described below.
Directory Structure
Packages & Versions
(package.json)
Related Files
(src/components/xxx.vue)
(src/pinia/xxx.ts)
(src/plugins/pinia.ts)
(src/store/index.ts)
(nuxt.config.json)
(tsconfig.json)
Expected behavior
The deployed environment should be able to access the Pinia store in the same way as the local environment.
Actual behavior
The following error occurs in the deployed environment and screen rendering fails.
In Nuxt2 (Vue2), the Pinia store does not seem to load properly in the deployment environment.
(Error Description)
(93382aa.js:2:495094)
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions