[Solved] Parsing error: The keyword ‘import‘ is reserved

Q: parsing error: the keyword ‘import’ is reserved

Answer:
analysis:
this is because we have not configured parseroptions in the configuration file. Eslintrc to specify the language version and module type
add the following configuration in. Eslintrc

{
  "parserOptions": {
    "ecmaVersion": 7,
    "sourceType": "module"
  }
}


Read More: