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

Got error when using Pinia: Uncaught SyntaxError: import not found: effectScope #48

Closed
keith0305 opened this issue Mar 28, 2022 · 2 comments

Comments

@keith0305
Copy link

keith0305 commented Mar 28, 2022

As of Pinia 2.0.0, the use of effectScope was introduced, hence I believe is the reason why I got this error.

If I remove the following code from vite.config.js, the error would go away.

alias: {
    'vue': 'reactivue',
    '@vue/runtime-dom': 'reactivue',
  },

This is probably due to "vue": "^3.2.31" in package.json.
However, I lose reactivity in React component this way.

Edit:
Pinia changelog for 2.0.0-rc.0 here:
https://github.com/vuejs/pinia/blob/v2/packages/pinia/CHANGELOG.md#200-rc0-2021-07-28=

And documentation for effectScope here:
https://vuejs.org/api/reactivity-advanced.html#effectscope

@sibbng
Copy link
Collaborator

sibbng commented Mar 28, 2022

Vue 3.2+ support is currently in beta. Check #46 for details. One of the biggest change in beta version is you need to remove aliases and import composition apis directly from vue. Check playgrounds folder in next branch for examples.

@keith0305
Copy link
Author

Thanks for the info! I am closing this now.

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

2 participants