1、 A blank page appears and an error is reported
Scheme I:
1: The path of JS and CSS resources is incorrect
Solution: add assetspublicpath in config/index.js: ‘/’ Change to assetspublicpath: ‘. /’
2: Error in background image in CSS
Solution: add a line of code in build/utils.js publicPath:’../../’
Scheme 2: some people may create Vue basic projects through hbuilder. There are no files in scheme 1 in the directory. Then you can try the scheme at this time. It’s easy to use on my side. I’m not sure everyone is effective.
Solution: create the vue.config.js file in the project root directory
The contents of the document are as follows:
module.exports = {
publicPath : './'
}
2、 Blank page, no resource error
At this time, the problem may be caused by the routing mode
history :
The new pushstate () and replacestate () methods in HTML5 history interface are utilized. (specific browser support is required) these two methods are applied to the browser’s history stack. On the basis of the existing back, forward and go, they provide the function of modifying the history. Only when they perform modification, although the current URL is changed, the browser will not immediately send a request to the back end.
Solution:
The default route of Vue is hash mode. You can modify it to hash. Or directly comment out mode: ‘history’,
Conclusion: the above is the relevant information I know. If any boss knows other questions, you can leave a message and learn together.
Read More:
- The Vue project is packaged and deployed to tomcat, and an Error 404 is reported as soon as it is refreshed
- The icon on the layui page is not displayed, and an error message is reported: Failed to decode downloaded font …..
- Cannot find module ‘request’ is prompted after electron is packaged
- An error is reported when passing data pages using Ajax: Vue is not defined
- Pikachu vulnerability is installed in the shooting range, and an error is reported when connecting to the MySQL database
- An error is reported in the spring cloud setup. Autowired appears and Eureka cannot be registered
- When installing pyaudio, an error is reported: failed error: portaudio. H: there is no such file or directory
- When the mybatis field contains an expression, an error is reported when it is stored in the database
- When setting up etcd cluster, an error is reported. Etcd: request cluster ID mismatch error resolution is only applicable to new etcd cluster or no data cluster
- The Vue mobile terminal cannot use string.replaceall, and the error message is blank
- When the spring MVC project is running on idea, an error is reported when the controller is a null pointer
- An error is reported when the file in hive parquet format is written in the Flink connection
- An import error is reported in the python. The solution to setting. Pylintrc is invalid
- An error is reported when Clickhouse is started. The error log information is: structure needs cleaning
- An error is reported when executing MVN. The diamond operator is not supported in source-1.5
- An error is reported when the electron Vue Vue component introduces the electron
- An error of 500 is reported when an item is assigned to a role
- An error is reported during Java operation due to the problem of static resource export
- Syntax error: typeerror: this.getoptions is not a function an error is reported when the. SCSS file is imported globally
- When using freemaker template to get values, an error is reported when the attribute is empty