---
# System prepended metadata

title: babel錯誤訊息

---

# babel錯誤訊息

建立一個新Vue專案後，點開App.vue或任意檔案，發現字首都出現紅字(檔案未作任何更動)


![](https://i.imgur.com/fvM7cab.png)
▲ 字首莫名紅字


而錯誤訊息如下
`Parsing error: No Babel config file detected for X:xxxxxx... Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files.`



---


後來爬了stackoverflow，有大神提供方法

1. 到setting設定 (左下齒輪>setting 或 File > Preferences > Settings　或　快捷鍵 `Ctrl+,` )
1. search bar 搜尋 **eslint**
1. 找到 **Eslint: Options**，點擊 **Edit in setting.json**
1. 加入以下程式碼:
```json=
"eslint.workingDirectories": [
    {"mode": "auto"}
],
```

*參考網址：https://stackoverflow.com/questions/71271760/parsing-error-no-babel-config-file-detected-when-ide-not-open-at-vue-projects*