Vue.js

ESLint | Parsing error: No Babel config file detected... 오류 해결법

LaKinRad 2022. 5. 7. 16:45

Vue.js 강의를 듣던 도중, 오류가 발생하였다.

 

Parsing error: No Babel config file detected for /Users/lakinrad/Desktop/study/vue-cli/src/App.vue. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files.

 

ESLint는 JavaScript의 문법을 확인해주는 도구인데, 

VSCode에서 프로젝트의 ESLint 설정 파일을 인식하는 부분에서 에러가 발생한 것 같다.

 


해결법은 간단하다.

 

1. 명령 팔레트 열기

 

보기-명령 팔레트... 를 선택하거나

단축키 control(mac은 command) + shift + p 를 눌러 명령 팔레트를 연다.

 

2. settings.json 열기

 

명령 팔레트에 settings 를 검색하여, 기본 설정: 설정 열기(JSON)를 클릭하여 settings.json을 연다.

 

3. settings.json에 코드 추가

"eslint.workingDirectories": [
       {"mode": "auto"}
]

 

위의 코드를 추가한 뒤, 변경사항을 저장하면 빨간 줄이 사라져 있는 것을 볼 수 있다.