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
- NPM run serve reported an error “NPM err! Missing script: start”
- [development experience] solution to unexpected syntax error: unexpected identifier in JSON parsing
- Module build failed: SyntaxError: Unexpected token
- Solution of “serve with message ‘spawn Vue cli service enoent”
- Unexpected syntax error: unexpected token<
- After NPM run dev is running, the browser does not respond and reports an error in. / ~ / Babel loader / lib! / ~ / Vue loader / lib/ selector.js?type=script&in
- Vue executes NPM run Dev and reports an error: missing script: dev
- Vue Alain startup command yarn serve reports an error
- Syntax error: unexpected token in uni app project compilation
- Uncaught syntax error: unexpected token ‘< 0‘
- Shell script syntax error near unexpected token ‘$’Do
- Error resolution of unexpected token in JSON at position 0
- Solve the problem of syntax error: unexpected end of file or syntax error near unexpected token ` fi ‘error
- Syntax error: unexpected EOF while parsing
- Unexpected token o in JSON at p
- Strange exception 001: invalid or unexpected token
- Syntax error near unexpected token ‘$’Do is reported when running bash file
- Solve the problem of shell script “syntax error near unexpected token `fi’”.
- ERROR in static/js/app.xxxxxxx.js from UglifyJs Unexpected token: operator (>)