0

I'm trying to import bootstrap js files and popper in my vue 3 project. I'm getting this error, maybe I'm doing something wrong when I import the files?

./node_modules/bootstrap/dist/js/bootstrap.min.js
Module not found: Error: Can't resolve '@popperjs/core' in '/Users/admin/Sites/host/node_modules/bootstrap/dist/js'

this is the code in my main.js file

import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import 'bootstrap/dist/css/bootstrap.min.css'
import 'popper.js/dist/popper.min.js'
import 'bootstrap/dist/js/bootstrap.min.js'
import '@fortawesome/fontawesome-free/css/all.min.css'


createApp(App).use(store).use(router).mount('#app')
3
  • 1
    Did you run npm i @popperjs/core before? Commented Feb 23, 2022 at 14:50
  • I've installed it using vue cli, yes. Commented Feb 23, 2022 at 15:18
  • Maybe this will help: stackoverflow.com/questions/65547199/… Commented Feb 23, 2022 at 15:20

0

Your Answer

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