Unexpected syntax error: unexpected token<

The Vue project encountered an error when running, as shown in the following figure:

after clicking on it, the following prompt appears:

it may be that there is an error in the reference of the resource path, such as vue.config.js In the configuration, the public path is “.”/”, while the browser is http://192.168.1.12 : 8080/test/#/to access the project in this way, there is an additional secondary directory /Test /, resulting in the resource cannot be found.

method 1: put vue.config.js In the configuration, publicpath: ‘/’

method 2: remove the secondary directory http://192.168.1.12 :8080/#/

Read More: