개발/트러블슈팅
vscode eslint export a CLIEngine 에러 해결방법
남양주개발자
2022. 2. 19. 10:43
728x90
반응형
yarn add --dev eslint
{
...
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
]
}
[Info - 10:31:57 AM] ESLint server stopped.
[Info - 10:31:58 AM] ESLint server running in node v12.8.1
[Info - 10:31:58 AM] ESLint server is running.
[Error - 10:31:59 AM] The eslint library loaded from /Users/ruden/Desktop/development/2022/test/node_modules/eslint/lib/api.js doesn't export a CLIEngine. You need at least eslint@1.0.0
package.json eslint 설치 버전은 8버전이 설치되어 있는 것을 확인할 수 있습니다.
{
"devDependencies": {
...
"eslint": "^8.9.0"
},
}
vscode-eslint에서 eslint@8을 지원하지 않기 때문에 발생한 에러입니다. 아마 추후에 업데이트를 통해 지원될 예정할 것이라 예상하지만, 현재는 직접 설치해서 해결해야되는 불편함이 있기 때문에 업데이트 되기 전까지는 7버전을 사용하는 것을 추천합니다.
Adapt ESLint v7 API · Issue #972 · microsoft/vscode-eslint
With the recent release of ESLint v7, CLIEngine was deprecated in favor of a new async ESLint class: CLIEngine deprecation notes I've had some difficulty in getting this to work in VSCode (curr...
github.com
eslint@7 버전 설치
yarn add --dev eslint@7
728x90
반응형
그리드형