Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
100 views
in Technique[技术] by (71.8m points)

javascript - Can't find 'Vue' in 'vue'. Vue CLI and bootstrap

I'm working with Vue CLI for the first time and I'm attempting to get bootstrap to work with everything. I've installed npm -i bootstrap, npm -i bootstrap-vue, and from what I've read on the bootstrap vue documentation. Now my main.js file looks like this:

import { createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app');
require('bootstrap/dist/css/bootstrap.min.css');

import Vue from '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)

However, this causes this error:

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

How do I get bootstrap to run with Vue CLI? I'm not very familiar with JQuery but I'm open to trying it with the traditional bootstrap way. I'm new to web frameworks and I want to learn the good practice of front-end development. Thanks.

Edit

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

question from:https://stackoverflow.com/questions/65893758/cant-find-vue-in-vue-vue-cli-and-bootstrap

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...