Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createPinia failed in Vue 2 #1199

Closed
Louis-Tian opened this issue Apr 4, 2022 · 4 comments
Closed

createPinia failed in Vue 2 #1199

Louis-Tian opened this issue Apr 4, 2022 · 4 comments

Comments

@Louis-Tian
Copy link

Reproduction

https://codesandbox.io/s/competent-tree-bvzyvk?file=/src/main.js

Steps to reproduce the bug

Basic setup with latest vue2
Follow the instruction here https://pinia.vuejs.org/getting-started.html
using

import { createPinia, PiniaVuePlugin } from 'pinia'

Vue.use(PiniaVuePlugin)
const pinia = createPinia()

Expected behavior

should run without error

Actual behavior

the store failed to initialize with error

TypeError
(0 , $csb__vue_demi.effectScope) is not a function
```an 

### Additional information

_No response_
@Liwoj
Copy link

Liwoj commented Apr 4, 2022

Seems related to this issue - ie. Vue Demi failing in Vue 2 mode in the environment that does not allow postinstall hook to run (as CodeSandbox or Stackblitz)

@posva
Copy link
Member

posva commented Apr 7, 2022

You have starters at https://github.com/piniajs/example-vue-2-vite/

@posva posva closed this as completed Apr 7, 2022
@ebisbe
Copy link

ebisbe commented Oct 7, 2022

I have a similar error:

pinia.mjs:1005 Uncaught TypeError: undefined is not a function
    at createPinia (pinia.mjs:1005:1)
    at ./app/javascript/pos/index.js (index.js:44:1)
    at __webpack_require__ (bootstrap:19:1)
    at ./app/javascript/packs/pos.js (ScreenSize.js:1:1)
    at __webpack_require__ (bootstrap:19:1)
    at bootstrap:83:1
    at bootstrap:83:1 

With Vue 2 with webpack instead of Vite

Copy link
Member

posva commented Jan 5, 2023

guergana added a commit to wmde/wikidata-mismatch-finder that referenced this issue Oct 12, 2023
guergana added a commit to wmde/wikidata-mismatch-finder that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants