error: Parsing error: Unexpected token <

Although this error occurred, it did not affect the operation of the project.
Solution:
Run installation dependency

Although this error occurred, it did not affect the operation of the project.
Solution:
Run installation dependency
npm install --save-dev babel-plugin-transform-object-rest-spread
Then create the.babelrc.js file in the project directory and add the following code
babel: {
presets: [
'es2015'
]
Plugins: [
'transform-object-rest-spread'
]
}
Rerun, error is gone.
Follow-up update solutions:
If the above methods will also appear error Parsing error: Unexpected Token, add the following code
Start with the installation dependencies
npm install babel-eslint --save
Then add code parsing to.eslintrc.js
"parser": "babel-eslint"
Restart it.
Read More:
- Parsing error: Unexpected token
- Problems with vue project installation No ESLint configuration found
- Solution to prompt “cannot find module ‘eslint config defaults / configurations / eslint’” when submitting with Git
- package.json And package- clock.json The difference between
- Module parse failed:Unexpectedtoken (1:0)You may need an appropriate loader to handle this file type
- Vscode error parsing error: invalid ecmaVersion.eslint ‘import’
- Module build failed: SyntaxError: Unexpected token
- Failed to load plugin react: cannot find module ‘eslint plugin react’ appears when running Vue project‘
- Gulp failed to run
- [How to Fix] Cannot find module ‘babel-eslint‘
- Webpack error module build failed: typeerror: fileSystem.statSync is not a function
- Webpack — module build failed: error: the node API for ‘Babel’ has been moved to Babel core
- How to Fix webpack Module build failed Error: The node API for ‘babel’ has been moved to babel-core
- Error in created hook: “referenceerror:” promise “undefined” Vue cli project Google is right, ie reported an error, “promise” undefined“
- Module build failed (from ./node_modules/babel-loader/lib/index.js) babel-loader
- Syntax error: unexpected token in uni app project compilation
- 209151; org.json.JSONException A JSONObject text must begin with'{‘at character 1 of {
- 【ipfs-api】npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
- 107_ Error report and solution of erc20 token transfer
- Error: Cannot find module ‘@babel/core’