简体   繁体   English

无法加载在“package.json”中声明的插件“vue”

[英]Failed to load plugin 'vue' declared in 'package.json'

Failed to load plugin 'vue' declared in 'package.json': Package subpath './lib/rules/array-bracket-spacing' is not defined by "exports" in C:\Users\<my_username>\FolderX\Subfolder\<appname>\eslint\package.json
Referenced from: C:\Users\<my_username>\FolderX\Subfolder\<appname>\package.json

That's the error I'm getting every time I npm run serve I've upated eslint, added prettier and fixed most of my vulnerability problems, and it still persists.这就是我每次npm run serve时都会遇到的错误,我更新了 eslint,添加了更漂亮并修复了我的大部分漏洞问题,但它仍然存在。 I've combed the eslint issues on github and there is nothing like this, some issues are similar but they refer to eslintrc.我已经梳理了github上的eslint问题,没有这样的问题,有些问题是类似的,但它们指的是eslintrc。 Nothing is matching this exactly.没有什么是完全匹配的。 I should mention that the app itself is very small and simple.我应该提一下,该应用程序本身非常小而且简单。 It was supposed to be the start of a project but when I was adding views to the project, this happened.它应该是一个项目的开始,但是当我向项目添加视图时,这发生了。

package.json包.json

  "name": "online-birth-registration-system",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^2.6.11",
    "vue-router": "^4.0.14"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^5.0.3",
    "@vue/cli-plugin-eslint": "^5.0.1",
    "@vue/cli-service": "^5.0.3",
    "babel-eslint": "^10.1.0",
    "eslint": "^8.11.0",
    "eslint-plugin-vue": "^6.2.2",
    "prettier-eslint": "^13.0.0",
    "vue-template-compiler": "^2.6.11"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {}
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

Any help would be greatly appreciated.任何帮助将不胜感激。

I ran into the same issue with array-bracket-spacing and was able to fix it by downgrading eslint in my package.json from "^8.6.0" to "^7.32.0" .我在使用array-bracket-spacing时遇到了同样的问题,并且能够通过将package.json中的 eslint 从"^8.6.0"降级到"^7.32.0" ^7.32.0" 来修复它。 None of the other suggested fixes worked for me either其他建议的修复都没有对我有用

Upgraded eslint-plugin-vue to 9.1.1升级eslint-plugin-vue9.1.1

Solved it for me为我解决了

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ReactJS:无法加载在“package.json”中声明的插件“testing-library”:找不到模块“./eslint-utils” - ReactJS : Failed to load plugin 'testing-library' declared in 'package.json : Cannot find module './eslint-utils' 无法加载在“package.json » eslint-config-react-app/jest”中声明的插件“jest”:无法读取未定义的属性(读取“meta”) - Failed to load plugin 'jest' declared in 'package.json » eslint-config-react-app/jest': Cannot read properties of undefined (reading 'meta') 无法加载在 'package.json » eslint-config-react-app#overrides[0]' 中声明的解析器 '@typescript-eslint/parser':找不到模块 'typescript' - Failed to load parser '@typescript-eslint/parser' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module 'typescript' 从 package.json 加载单独的.env - Load separate .env from package.json Vue cli 3 显示 package.json 中的信息 - Vue cli 3 display info from the package.json 链接 package.json 脚本以启动 Express 服务器和 Vue 应用程序 - Chaining package.json scripts to start Express server and Vue app 如果package-lock.json锁定它,那么在package.json中声明的“兼容版本”(^版本)有什么意义呢? - What's the point of having a “compatible version” (^version) declared in package.json if package-lock.json locks it? 如何从 webpack 插件中读取 package.json - How to read package.json from webpack plugin 如何将我的应用程序中的变量加载到 package.json 中? - How to load a variable form my app into package.json? 问题是package.json吗? - Problem is package.json?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM