【问题标题】:cannot find module vue/ref-transform找不到模块 vue/ref-transform
【发布时间】:2021-11-13 13:42:15
【问题描述】:

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

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

但是在安装引导程序后,我遇到了这个错误: -错误:找不到模块'@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"
  ]
}

【问题讨论】:

  • 你能展示你的 package.json 吗?
  • 添加了我的 package.json

标签: javascript vue.js bootstrap-4 bootstrap-vue


【解决方案1】:

Bootstrap Vue (尚)与 Vue 3 兼容。

目前的计划是:

BootstrapVue v2:

  • v2.17.0 后功能冻结
  • 仅重要的错误修复和安全更新

BootstrapVue v3:

  • 基于 BootstrapVue 2.17.0
  • Vue.js v3 支持
  • Bootstrap v4.x 支持
  • 发布:在 Vue.js v3 发布后不久

BootstrapVue v4:

  • 完全重写
  • Vue.js v3 支持
  • Bootstrap v5 支持
  • 发布:尚无预计到达时间

所以是的,它来了;)

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

【讨论】:

  • 哦,我的错,没有意识到
猜你喜欢
  • 1970-01-01
  • 2020-03-23
  • 1970-01-01
  • 2020-09-27
  • 2020-01-29
  • 1970-01-01
  • 2022-08-13
  • 2019-06-12
  • 2021-04-13
相关资源
最近更新 更多