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

In monorepos the Vue instance is not correctly resolved #459

Open
stefusilviu opened this issue Apr 30, 2024 · 2 comments
Open

In monorepos the Vue instance is not correctly resolved #459

stefusilviu opened this issue Apr 30, 2024 · 2 comments

Comments

@stefusilviu
Copy link

We're trying to use the component in another package as part of a monorepo. When we import the new (wrapper) component, we get this error:TypeError: Cannot read properties of null (reading 'isCE').

version: 9.1.0
Vue: 3.3.4

@Vadizar
Copy link

Vadizar commented May 1, 2024

Add in your webpack.config.js:

resolve: {
        alias: {
            vue: path.resolve(dirname, 'node_modules/vue'),
        }
}

@stefusilviu
Copy link
Author

Add in your webpack.config.js:

resolve: {
        alias: {
            vue: path.resolve(dirname, 'node_modules/vue'),
        }
}

We're using Vite. I discovered that the problem was the different Vue versions used by our packages so the solutions was to use the resolutions field in our package.json file and set the Vue version accordingly.

But I'm thinking... Why isn't Vue set as peer dependency on this module? This should solve the issue.

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