简体   繁体   English

无法加载在“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')

Here is a screenshot of the error screen这是错误屏幕的屏幕截图

This is what is in the package.json.这就是 package.json 中的内容。

{
  "name": "********",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.16.4",
    "@testing-library/react": "^12.1.4",
    "@testing-library/user-event": "^13.5.0",
    "firebase": "^9.6.10",
    "moment": "^2.29.2",
    "react": "^18.0.0",
    "react-datepicker": "^4.7.0",
    "react-dom": "^18.0.0",
    "react-router-dom": "^6.3.0",
    "react-scripts": "5.0.0",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ],
    "rules": {
      "react-hooks/exhanstive-deps": "off"
    }
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Is there any way to solve this problem other than deleting "eslintConfig"?除了删除“eslintConfig”之外,还有什么办法可以解决这个问题吗? I have looked at other articles regarding this error but could not understand it.我已经查看了有关此错误的其他文章,但无法理解。

Try deleting your node_modules and install them again.尝试删除您的 node_modules 并重新安装它们。

It seems like there is an underlying dependency which is missing.似乎缺少一个潜在的依赖项。

暂无
暂无

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

相关问题 如何解决这个错误:package.json » eslint-config-react-app/jest#overrides[0]: Environment key "jest/globals" is unknown - How to solve this error: package.json » eslint-config-react-app/jest#overrides[0]: Environment key "jest/globals" is unknown 无法加载在 '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' eslint-plugin-jest给出“ESLint堆栈跟踪:TypeError:无法读取未定义的属性'meta'” - eslint-plugin-jest gives “ESLint stack trace: TypeError: Cannot read property 'meta' of undefined” ReactJS:无法加载在“package.json”中声明的插件“testing-library”:找不到模块“./eslint-utils” - ReactJS : Failed to load plugin 'testing-library' declared in 'package.json : Cannot find module './eslint-utils' 开玩笑:无法读取未定义的属性(读取“0”) - Jest: Cannot read properties of undefined (reading '0') 无法加载在“package.json”中声明的插件“vue” - Failed to load plugin 'vue' declared in 'package.json' TypeError:无法读取未定义(读取“长度”)JEST 测试的属性 - TypeError: Cannot read properties of undefined (reading 'length') JEST test JEST TypeError:无法读取未定义的属性“json” - JEST TypeError: Cannot read property 'json' of undefined TypeError: Cannot read properties of undefined (reading 'then') - while Mocking Fetch call in Jest - TypeError: Cannot read properties of undefined (reading 'then') - while Mocking Fetch call in Jest Jest 导入模块,TypeError:无法读取未定义的属性(读取“utf16le”) - Jest import module, TypeError: Cannot read properties of undefined (reading 'utf16le')
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM