eslint: error Parsing error: Unexpected token <

简介: eslint: error Parsing error: Unexpected token <

一、背景

启动项目,出现错误如下:

error  Parsing error: Unexpected token <

二、解决

2.1、安装 babel-eslint

yarn add babel-eslint

2.2、.eslintrc.js配置

"parser": "babel-eslint",

2.3、再次启动项目,问题消失

三、欢迎交流指正。

相关文章
|
资源调度
umi中AssertionError [ERR_ASSERTION]: filePath not found of
umi中AssertionError [ERR_ASSERTION]: filePath not found of
|
3月前
|
JSON JavaScript 前端开发
Uncaught SyntaxError: Invalid or unexpected token
Uncaught SyntaxError: Invalid or unexpected token
41 0
Parsing error: duplicate-attribute.eslintvue/no-parsing-error,Eslint如何添加两个@Click事件
Parsing error: duplicate-attribute.eslintvue/no-parsing-error,Eslint如何添加两个@Click事件
|
6月前
|
JavaScript
Parsing error: No Babel config file detected for 。。
Parsing error: No Babel config file detected for 。。
151 3
|
6月前
|
JSON 缓存 前端开发
Unexpected end of JSON input while parsing near '....1","eslint-loader":"'
Unexpected end of JSON input while parsing near '....1","eslint-loader":"'
66 0
|
6月前
Parsing error: No Babel config file detected for XXXXX
Parsing error: No Babel config file detected for XXXXX
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror Error: Missing required argument #1
752 0
|
JSON 数据格式
NPM Error Unexpected token < in JSON at position 0 while parsing near ‘<!DOCTYP
NPM Error Unexpected token < in JSON at position 0 while parsing near ‘<!DOCTYP
406 0
|
JavaScript
ESLint Parsing error: control-character-in-input-stream vue/no-parsing-error
ESLint Parsing error: control-character-in-input-stream vue/no-parsing-error
157 0
|
JSON 数据格式
解决报错信息之:SyntaxError: Unexpected token R in JSON at position 0
解决报错信息之:SyntaxError: Unexpected token R in JSON at position 0
372 0