1

I have an old Vue 2 project that we are migrating to Vue 3, it had bootstrap which I ended up removing considering its old versions don't work really well with vue 3. Everything else seems fine except this error,

This dependency was not found:

* vue in ./src/main.js, ./src/api/store.js and 3 others

To install it, you can run: npm install --save vue

I used vue update to update to vue 3, npm update to upgrade some dependencies, and had to use --legacy-peer-deps with the npm commads the first time, I had some errors which were removed after removing bootstrap imports from main.js. I have looked around, can't seem to find the solution for this, haven't worked with Vue3 a lot, any help would be appreciated thanks.
This is my main.js enter image description here

This is me initializing app --- used to work before vue update

enter image description here

This is package.json vue enter image description here

/Edit/

I changed import Vue to vue createApp, had some errors in terminal and terminal told me to update vue-loader to latest version, which I did and now I'm getting this error. I have removed almost all of Vue.use items to make sure atleast app.vue loads and then I can move on from there. I'm following this tutorial

https://blog.logrocket.com/refactoring-vue-2-apps-vue-3/

New errors

I'm getthing this issue even though VueLoaderPlugin is in webpack config file

const VueLoaderPlugin = require('vue-loader/lib/plugin')

enter image description here

2
  • 2
    The question cannot be answered without knowing your case. If there's no vue dependency, it needs to be added. If it exists but it's not installed for some reasons, deps need to be reinstalled Commented Mar 15, 2023 at 13:04
  • Consider creating a runnable minimal reproducible example. What you posted so far cannot be used to repro, making your question unanswerable. Use codesandbox or a similar service. Commented Mar 15, 2023 at 17:10

1 Answer 1

1

It simply doesn't work like that anymore in Vue 3. import Vue and new Vue() have been replaced by:

import { createApp } from 'vue';

const app = createApp(App);

Vue 3 isn't a drop-in replacement for Vue 2; there's a number of breaking changes you should probably read up on.

Sign up to request clarification or add additional context in comments.

1 Comment

As well as all of his other plugins he's using that might not have Vue3 versions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.