Skip to content

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

Closed
@keith0305

Description

@keith0305

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions