[英]Why Eslint Plugins is found locally but I cannot build on the server?
ESlint command on building server is failing with error:构建服务器上的 ESlint 命令失败并出现错误:
ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".
Whereas, everything is working perfectly locally.然而,一切都在本地完美运行。 There is no global eslint command on the server so it executes the Dev Dependency defined in Package.json
服务器上没有全局 eslint 命令,因此它执行 Package.json 中定义的 Dev Dependency
.eslintrc .eslintrc
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
Package.json Package.json
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.13.0",
"eslint": "^7.18.0",
The issue has been solve by adding该问题已通过添加解决
"root": true,
To .eslintrc file到.eslintrc文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.