[Solved] Vue3.X version error: Parsing error: Parsing error: Unexpected token

For example, the following error: it has nothing to do with the code

 error  in ./src/App.vue

Module Error (from ./node_modules/eslint-loader/index.js):

  1:1  error  Parsing error: Unexpected token <

✖ 1 problem (1 error, 0 warnings)


1. Install the eslint plugin Vue plug-in

 npm install eslint-plugin-vue -D

2. Add the following configuration in the. Eslint.js configuration file:

module.exports = {
  root: true,
  parserOptions: {
    "ecmaVersion": 7,
    sourceType: 'module'
  "parser": "vue-eslint-parser",   // Add this line
  rules: {

Similar Posts: