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)
- [Solved] Vue Less error: Webpack project report expected indentation of 0 spaces but found 2
- 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] VUE eslint Error: Expected linebreaks to be ‘LF‘ but found ‘CRLF
- [Solved] Vue3.0 Error: The component has been registered but not used vue/no-unused-components, Close eslint
- [Solved] Vue Project Error: This relative module was not found
- Vue Error: component has been registered but not used [Two Methods to Solve]
- [Solved] Vue Project startup error: no eslint configuration found
- VUE Error: Mixed spaces and tabs [How to Solve]
- [Solved] Vue E-Charts Error: These dependencies were not found:
- Vue Startup Error: 98% after emitting CopyPlugin This dependency was not found:
- “Failed to load resource: net::ERR_FILE_NOT_FOUND” error. The project created by vue-cli 3.0 can run under dev, and an error is reported after packaging, and the page is blank.
- vue error: ‘ev’ is defined but never used (no-unused-vars)
- Vue Start Error: This relative module was not found:
- Vue Dynamic Display Picture Error 404: Not Found [How to Solve]
- [Solved] Vite Error: Failed to load module script: Expected a JavaScript module script but the server…
- [Solved] Vue Import swiper.css Error: Module not found…
- How to Solve VUE Error: Mixed spaces and tabs
- [Solved] Vue Error: error ‘xxx‘ is defined but never used no-unused-vars