我在vue.js中新創建了一個專案,一切正常(主頁)。然后我用這些步驟安裝了bootstrap-vue。
$ yarn add bootstrap bootstrap-vue.
$ npm install bootstrap bootstrap-vue --save.
但是在安裝bootstrap之后,我被這個錯誤卡住了。 -Error: 無法找到模塊'@vue/ref-transform'
。請給我一些提示,我可以做什么?
這是我的package.json
。 。{
"name": "testProj",
"版本": "0.1.0",
"私有": true,
"腳本": {
"service": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"bootstrap": "^5.1.1",
"bootstrap-vue": "^2.21.2",
"core-js": "^3.6.5",
"vue": "^3.0.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"擴展": [
"plugin:vue/vue3-essential" 。
"ESLINT:推薦"
],
"parserOptions": {
"parser": "babel-eslint"
},
"規則": {}
},
"browserslist": [
"> 1%",
"最后兩個版本",
"沒死"
]
}
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" class="snippet-box-edit snippet-box-result" frameborder="0"></iframe>
uj5u.com熱心網友回復:
Bootstrap Vue與Vue 3不兼容。
你需要使用Vue 2.
。轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/327589.html
標籤:
