简体   繁体   English

使用 ESLint 构建 react-webapp 时遇到问题; ESLint 找不到要扩展的配置“developit”

[英]Trouble building react-webapp with ESLint; ESLint couldn't find the config "developit" to extend from

My react app works as normal using npm start , but when I try npm run build I got trouble.我的 React 应用程序使用npm start正常工作,但是当我尝试npm run build时我遇到了麻烦。

Oops! Something went wrong! :(

ESLint: 6.8.0.

ESLint couldn't find the config "developit" to extend from. Please check that the name of the config is correct.

The config "developit" was referenced from the config file in "/home/user/beregning-innsikt/beregning-innsikt-webapp/src/main/webapp/node_modules/@babel/preset-modules/package.json".

If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! beregning-innsikt-webapp@2.0.0 lint: `eslint 'src/**/*{.ts,.tsx}'`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the beregning-innsikt-webapp@2.0.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2020-08-11T08_20_44_975Z-debug.log
ERROR: "lint" exited with 2.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! beregning-innsikt-webapp@2.0.0 prebuild: `npm-run-all clean lint && aurora-mi git`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the beregning-innsikt-webapp@2.0.0 prebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2020-08-11T08_20_45_002Z-debug.log

The Babel config file contains this: Babel 配置文件包含以下内容:

 "eslintConfig": {
    "extends": "developit",
    "rules": {
      "no-console": 0,
      "new-cap": 0
    }
  }, 

I have tried node v 13.7.0 and 14.1.0.我已经尝试过节点 v 13.7.0 和 14.1.0。 Does anybody know how to solve this problem?有人知道如何解决这个问题吗?

Seems like it is linting node_modules too似乎它node_modules

To fix this you can create file .eslintignore in your root directory and add node_modules/ folder to your eslintignore file要解决此问题,您可以在根目录中创建文件.eslintignore并将node_modules/文件夹添加到您的 eslintignore 文件中

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

相关问题 ESLint 找不到要扩展的配置“airbnb-base” - ESLint couldn't find the config "airbnb-base" to extend from eslint 命令在 CI 服务器上失败,并出现错误“ESLint 找不到要扩展的配置”标准“” - eslint command fails on CI Server with error “ESLint couldn't find the config ”standard“ to extend from” 错误 - ESLint:7.32.0 ESLint 找不到要扩展的配置“标准” - Error - ESLint: 7.32.0 ESLint couldn't find the config "standard" to extend from 找不到模块'eslint-config-defaults / configurations / eslint' - Cannot find module 'eslint-config-defaults/configurations/eslint' 纱线 - 错误找不到与“5.31.0”匹配的“@typescript-eslint/type-utils”的任何版本 - Yarn - error Couldn't find any versions for "@typescript-eslint/type-utils" that matches "5.31.0" 在JavaScript Webapp中将节点与eslint一起使用 - Use of node with eslint in a javascript webapp 使用 eslint-config-airbnb 而不使用 react 插件 - Use eslint-config-airbnb without react plugins Mac WebStorm错误:无法找到模块'eslint-config-airbnb' - Mac WebStorm Error: Cannot find module 'eslint-config-airbnb' 如何在 Yeoman webapp 中配置 eslint? - How can I configure eslint in Yeoman webapp? Gulp eslint 找不到我的 .eslintrc 文件 - Gulp eslint doesn't find my .eslintrc file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM