Parsing error: No Babel config file detected for XXXXX

简介: Parsing error: No Babel config file detected for XXXXX

一、报错如下:

二、报错原因

eslint根据eslint配置文件的parserOption,知道了要使用babel对代码进行解析,但是解析babel需要使用babel配置文件,由于找不到配置文件(babel配置文件默认需要放在根目录下),所以会报错。因此,添加requireConfigFile:

false,本质上是告诉eslint,不用查找这个配置文件了,虽然表面上可以解决这个报错,但是在babel配置文件里写的东西也就失效了。

二、解决办法

方法一:自己找到的第一种解决方法: 只用VScode打开项目文件就可以解决,找到你的项目文件,拖拽到VScode上打开就行了(把项目文件作为根目录)

方法二:有人说的解决方法就是配置requireConfigFile:false,本质上就是告诉eslint,不用给我查找这个配置文件了,但是我又继续查了资料,看到有博主说,这样只是从表面上的确可以解决这个报错,但是你在babel配置文件里写的东西也就失效了。后面我又查了其他资料解决了这个报错。

在VSCode中 把它作为根目录打开,我已成功解决


相关文章
|
JSON 移动开发 算法框架/工具
成功解决raise ValueError(‘No model found in config file.‘) ValueError: No model found in config file.
成功解决raise ValueError(‘No model found in config file.‘) ValueError: No model found in config file.
|
4月前
|
NoSQL Redis
进行主从复制时出现的异常FATAL CONFIG FILE ERROR (Redis 6.2.6)Reading the configuration file
进行主从复制时出现的异常FATAL CONFIG FILE ERROR (Redis 6.2.6)Reading the configuration file
|
5月前
|
关系型数据库 MySQL 数据库
Mysql-错误处理: Found option without preceding group in config file
Mysql-错误处理: Found option without preceding group in config file
172 0
|
6月前
|
关系型数据库 MySQL Linux
DVWA CentOS Could not connect to the MySQL service. Please check the config file.
DVWA CentOS Could not connect to the MySQL service. Please check the config file.
37 0
|
9月前
|
关系型数据库 MySQL 数据库
【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error
【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error
595 0
|
11月前
|
JavaScript
Vue3报错:Parsing error: No Babel config file detected 解决
Vue3报错:Parsing error: No Babel config file detected 解决
184 0
|
开发工具 git
error: could not lock config file .git/config: Permission denied/Command failed with exit 255
error: could not lock config file .git/config: Permission denied/Command failed with exit 255
304 0
SpringCloud项目启动失败 not found config file[log.properties]
SpringCloud项目启动失败 not found config file[log.properties]
162 0
SpringCloud项目启动失败 not found config file[log.properties]
|
JSON 移动开发 算法框架/工具
成功解决raise ValueError(‘No model found in config file.‘) ValueError: No model found in config file.
成功解决raise ValueError(‘No model found in config file.‘) ValueError: No model found in config file.
|
2月前
|
Java 数据库连接 开发工具
web后端-SpringCloud-Config分布配置
web后端-SpringCloud-Config分布配置

热门文章

最新文章