TypeError: this.libOptions.parse is not a function
安装完node.js运行项目后,报错:
TypeError: this.libOptions.parse is not a function at ESLint8Plugin.<anonymous> (C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:139:64) at step (C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:44:23) at Object.next (C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:25:53) at C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:19:71 at new Promise (<anonymous>) at __awaiter (C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:15:12) at ESLint8Plugin.invokeESLint (C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:133:16) at ESLint8Plugin.<anonymous> (C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:120:44) at step (C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:44:23) at Object.next (C:\Program Files\JetBrains\GoLand 2022.1.4\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint8-plugin.js:25:53) Process finished with exit code -1
该问题是由 ESLint 8.23 中引入的更改引起的(offending upstream commit: 在 GitHub 上查看)。将 ESLint 降级到 8.22.x 或更早版本解决(使用 npm install eslint@8.22.0 --save-exact )