vue报错:We‘re sorry but doesn‘t work properly without JavaScript enabled. Please enable it to continue

Vue error: We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue
This error feels like a universal error. This error will be reported for various reasons. It can only be checked one by one. Summarize the occurrence of this error error case:

  1. The routing mode is a history that requires the backend to modify the mapping relationship. If the configuration is wrong, an error will be reported; the solution: the front end modifies the routing mode or the backend configures the mapping, and the backend can also configure pseudo-static;
  2. Publicpath path problem, after packaging, the project needs to set the path location according to the server storage location;
  3. In the case of local development, if an error is reported, it is necessary to check whether the proxy server and the sending address of the request are correct;
  4. This will also happen if the ID name in html is inconsistent with the vue mount name; ;
  5. Cache problem, clear the browser cache and then run the project;
  6. Some companies will make special settings for the network, and the specific reasons need to be checked in detail;
  7. The backend has made a pseudo-static default access to the front-end project, for example:
      	location / {
          
          
      		 index index.html index.htm;
      		 try_files $uri $uri/ /index.html;
      	}
    
    An error will be reported when accessing static files that do not exist in the backend, and the default request is the frontend project. Solution: If the static file is dynamically generated, the backend will judge whether the file exists before requesting the file;
    if the same situation occurs, the article will continue to be updated;

Guess you like

Origin blog.csdn.net/lff951223/article/details/130237852