找不到模块 vue/ref-transform

cannot find module vue/ref-transform

我在 vue.js 中有一个新创建的项目,一切正常(主页)。然后我用这些步骤安装了 bootstrap-vue。

$ yarn add bootstrap bootstrap-vue.
$ npm install bootstrap bootstrap-vue --save.

但是在安装 bootstrap 之后我遇到了这个错误: -错误:找不到模块'@vue/ref-transform'

有什么提示吗?

这是我的package.json

{
  "name": "testProj",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "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
    },
    "extends": [
      "plugin:vue/vue3-essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {}
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

Bootstrap Vue (还)与 Vue 3 兼容。

当前计划是:

BootstrapVue v2:

  • Feature-freeze after v2.17.0
  • Only critical bugfixes and security updates

BootstrapVue v3:

  • Based on BootstrapVue 2.17.0
  • Vue.js v3 support
  • Bootstrap v4.x support
  • Release: Short after Vue.js v3 release

BootstrapVue v4:

  • Complete rewrite
  • Vue.js v3 support
  • Bootstrap v5 support
  • Release: No ETA yet

所以呀,它来了 ;)

更多信息在这里:https://github.com/bootstrap-vue/bootstrap-vue/issues/5196