buefy@0.9.3 需要 vue@^2.6.11 的对等点,但没有安装

Posted

技术标签:

【中文标题】buefy@0.9.3 需要 vue@^2.6.11 的对等点,但没有安装【英文标题】:buefy@0.9.3 requires a peer of vue@^2.6.11 but none is installed 【发布时间】:2021-01-26 18:21:15 【问题描述】:

我想在我的项目中安装最新版本的 buefy,即 0.9.3。目前我已经安装了 0.8.3

如果我运行npm install -g buefy@latest,我会收到

npm WARN buefy@0.9.3 需要 vue@^2.6.11 的对等点,但没有一个是 安装。您必须自己安装对等依赖项。

buefy@0.9.3 在 0.511 秒内更新了 1 个包

但是,Buefey 0.8.2 仍然安装在 package.json 中

我也很难理解错误,因为我安装了 vue 2.6.12

我尝试运行(如https://***.com/a/58254678/2311074 中所述)

$  npm install --save-dev "vue@^2.6.11"

返回的

adam@adam-MS-7A63:~/www/homestead/memberportal$ npm install --save-dev "vue@^2.6.11"
npm WARN laravel-mix-purgecss@5.0.0 requires a peer of laravel-mix@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN trumbowyg@2.21.0 requires a peer of jQuery@>=1.8 but none is installed. You must install peer dependencies yourself.
npm WARN vuetifyjs-mix-extension@0.0.2 requires a peer of laravel-mix@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted "os":"darwin","arch":"any" (current: "os":"linux","arch":"x64")
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted "os":"darwin","arch":"any" (current: "os":"linux","arch":"x64")

+ vue@2.6.12
updated 1 package and audited 1679 packages in 4.824s

33 packages are looking for funding
  run `npm fund` for details

found 27 vulnerabilities (24 low, 3 high)
  run `npm audit fix` to fix them, or `npm audit` for details

但我在尝试升级 buefy 时仍然收到相同的消息。

任何提示我错过了什么?这是我的package.json


    "private": true,
    "scripts": 
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --open --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    ,
    "devDependencies": 
        "axios": "^0.19",
        "babel-plugin-component": "^1.1.1",
        "bootstrap": "^4.5.2",
        "cross-env": "^7.0",
        "deepmerge": "^4.2.2",
        "fibers": "^4.0.2",
        "jquery": "^3.5.1",
        "laravel-mix": "^4.1.4",
        "laravel-mix-purgecss": "^5.0.0-rc.1",
        "lodash": "^4.17.20",
        "popper.js": "^1.12",
        "purify-css": "^1.2.5",
        "purifycss-webpack": "^0.7.0",
        "resolve-url-loader": "^2.3.1",
        "sass": "^1.27.0",
        "sass-loader": "^7.3.1",
        "vue": "^2.6.12",
        "vue-template-compiler": "^2.6.12",
        "vuetifyjs-mix-extension": "0.0.2"
    ,
    "dependencies": 
        "axiom": "^0.1.6",
        "buefy": "^0.8.20",
        "element-ui": "^2.13.1",
        "modal-video": "^2.4.2",
        "prod": "^1.0.1",
        "trumbowyg": "^2.21.0",
        "vue-multiselect": "^2.1.6",
        "vue-scrollto": "^2.19.1",
        "vue-trumbowyg": "^3.6.2",
        "vuetify": "^2.3.13",
        "vuetify-loader": "^1.6.0"
    

【问题讨论】:

顺便说一句,为什么您使用的大多数软件包都安装为devDependencies?我的意思是,是的,在你的情况下它很可能并不重要(它似乎不是日志中的一个包)——除非有一天你开始在生产模式下运行你的 npm i 【参考方案1】:

npm install -g 表示您正在尝试全局安装软件包。

【讨论】:

以上是关于buefy@0.9.3 需要 vue@^2.6.11 的对等点,但没有安装的主要内容,如果未能解决你的问题,请参考以下文章

calico 2.6.1 升级至 3.11

学vue前你需要知道的:vue生态圈

Vue 3 模板根只需要一个元素。 eslint-plugin-vue

为什么有的插件安装需要用Vue.use()方法

如果我想从带有 `vue-property-decorator`(类风格)的 vue2 升级到 vue3,有啥需要担心的吗?

vue图片上传需要token吗