Several error messages were encountered when learning Vue project was packaged
★ Extra semicolon
The first is that there is an additional semicolon. The error query found that main.js does have a semicolon. After we deleted it, the error disappeared
★ Expected indentation of 2 spaces but found 4
The second one is “expected to indent 2 spaces, but found 4”. After Baidu search, it is found that this is not an error, but a check rule. Find this file in the project and add this configuration. See the figure below
★ Newline required at end of file but not found
The third one is more wonderful. It means that “line breaks are required at the end of the file, but they are not found”. Then we go to the error file, that is, main.js. We can solve the error by typing enter at the end. See the figure below
Adding a blank line here can solve the problem of error reporting
Read More:
- [Solved] ESLint error: Newline required at end of file but not found (eol-last)
- Newline required at end of file but not found eol-last [How to Solve]
- [Solved] 20:1 error Expected indentation of 2 spaces but found 4 indent 21:1 error Expected indent
- [Solved] ✖ 2 problem (1 error, 0 warnings) 2 error and 0 warnings potentially fixable with the`–fix`
- [Solved] Vue Less error: Webpack project report expected indentation of 0 spaces but found 2
- VUE Error: Mixed spaces and tabs [How to Solve]
- [Solved] Error: #error More than 1 blank line not allowed no-multiple-empty-lines
- [Solved] VUE eslint Error: Expected linebreaks to be ‘LF‘ but found ‘CRLF
- Vscode save Vue format eslint check error [How to Solve]
- [Solved] Vue prettier error: error Delete `␍` prettier/prettier
- How to Solve Vue cli configuration SCSS global variable error
- [Solved] Failed to load config “prettier“ to extend from.?
- [Solved] Invalid prop: type check failed for prop “modelValue“. Expected Number…
- eslint Error: Delete `␍` [How to Solve]
- [Solved] Vue Project startup error: no eslint configuration found
- After installing NPM, NRM LS reports an error throw new err_INVALID_ARG_TYPE(name, ‘string‘, value)
- About JS error uncaught syntax error: invalid shorthand property initializer
- [Weex]Error in creating project NPM: unable to load file D:\program files\nodejs\node_ global\ weex.ps1 Because scripts are not allowed to run on this system.
- How to open a page in a new window by Vue router
- [Solved] Parsing error: No Babel config file detected for XXX