简体   繁体   English

eslint 命令在 CI 服务器上失败,并出现错误“ESLint 找不到要扩展的配置”标准“”

[英]eslint command fails on CI Server with error “ESLint couldn't find the config ”standard“ to extend from”

I have eslint configuration which works perfectly fine on my local setup (with vscode editor).我有 eslint 配置,在我的本地设置(使用 vscode 编辑器)上运行良好。

but on CI Server, it fails with following error:但在 CI 服务器上,它失败并出现以下错误:

  eslint:config-array-factory Config file found: /home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json +0ms
  eslint:config-array-factory Loading {extends:"standard"} relative to /home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json +1ms

Oops! Something went wrong! :(

ESLint: 6.6.0.

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

The config "standard" was referenced from the config file in "/home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json".

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

I am running following command to lint:我正在运行以下命令来 lint:

./node_modules/.bin/eslint./ --ext.ts

I see there are multiple issues on git related to this ( https://github.com/microsoft/vscode-eslint/issues/696 ) but none has solution or that did not worked for me.我看到 git 上存在多个与此相关的问题( https://github.com/microsoft/vscode-eslint/issues/696 )但没有解决方案或对我不起作用。

Can anyone please help me here.任何人都可以在这里帮助我。

it seems that eslint-config-standard-with-typescript isn't installed.似乎没有安装 eslint-config-standard-with-typescript。

Try this:尝试这个:

npm install --save-dev eslint@7 eslint-plugin-promise@4 eslint-plugin-import@2 eslint-plugin-node@11 @typescript-eslint/eslint-plugin@4 eslint-config-standard-with-typescript

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

相关问题 错误 - ESLint:7.32.0 ESLint 找不到要扩展的配置“标准” - Error - ESLint: 7.32.0 ESLint couldn't find the config "standard" to extend from ESLint 找不到要扩展的配置“airbnb-base” - ESLint couldn't find the config "airbnb-base" to extend from 使用 ESLint 构建 react-webapp 时遇到问题; ESLint 找不到要扩展的配置“developit” - Trouble building react-webapp with ESLint; ESLint couldn't find the config "developit" to extend from WebStorm eslint-config-standard错误 - WebStorm eslint-config-standard error 纱线 - 错误找不到与“5.31.0”匹配的“@typescript-eslint/type-utils”的任何版本 - Yarn - error Couldn't find any versions for "@typescript-eslint/type-utils" that matches "5.31.0" 从命令行安装ESlint错误 - ESlint Error Install from Command Line Mac WebStorm错误:无法找到模块'eslint-config-airbnb' - Mac WebStorm Error: Cannot find module 'eslint-config-airbnb' 找不到模块'eslint-config-defaults / configurations / eslint' - Cannot find module 'eslint-config-defaults/configurations/eslint' eslint src/** --fix 找不到任何匹配项 - eslint src/** --fix fails to find any matches vuejs/eslint-plugin-vue 模块构建失败(来自./node_modules/eslint-loader/dist/cjs.js):错误:找不到模块'eslint' - vuejs/eslint-plugin-vue Module build failed (from ./node_modules/eslint-loader/dist/cjs.js): Error: Cannot find module 'eslint'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM