1

enter image description here

Uncaught TypeError: Cannot read property 'prototype' of undefined at eval (config.js?228e:6) at Module../node_modules/bootstrap-vue/esm/utils/config.js (chunk-vendors.js:6778) at webpack_require (app.js:849) at fn (app.js:151) at eval (props.js?cf75:1) at Module../node_modules/bootstrap-vue/esm/utils/props.js (chunk-vendors.js:7054) at webpack_require (app.js:849) at fn (app.js:151) at eval (model.js?58f2:1) at Module../node_modules/bootstrap-vue/esm/utils/model.js (chunk-vendors.js:6970)

I think it's connect with npm console:

warning in ./src/plugins/bootstrap-vue.js

"export 'default' (imported as 'Vue') was not found in 'vue'

warning in ./node_modules/bootstrap-vue/esm/vue.js

"export 'default' (reexported as 'Vue') was not found in 'vue'

10
  • connect bootstrap-vue to vue cli Commented Mar 1, 2021 at 16:42
  • how to fix that? help please Commented Mar 1, 2021 at 16:44
  • can you share your main.js or index.js file content? Commented Mar 1, 2021 at 16:48
  • //main.js import './plugins/bootstrap-vue' import '@babel/polyfill' import 'mutationobserver-shim' import './plugins/bootstrap-vue' import { createApp } from 'vue' import App from './App.vue' createApp(App).mount('#app') Commented Mar 1, 2021 at 16:53
  • Have you tried importing Bootstrap-vue like so import { BootstrapVue, IconsPlugin } from 'bootstrap-vue' & then passing it in use() method like so Vue.use(BootstrapVue)? in the main.js or app.js file? Commented Mar 1, 2021 at 16:56

1 Answer 1

1

You can install BootstrapVue in Vue CLI by:

  • Running the command npm i bootstrap-vue from your project's root.
  • Import it in your main.js file like so:
import Vue from 'vue'
import App from './App.vue'

import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue'

import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'

Vue.use(BootstrapVue)
Vue.use(BootstrapVueIcons)

new Vue({
  render: h => h(App),
}).$mount('#app')

You should be able to import & use BootstrapVue's components now.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.