vue cli - Uncaught SyntaxError: Unexpected token <

前端 未结 14 2289
说谎
说谎 2020-12-31 03:39

I create my project with vue-cli 3.0. Initially it runs ok. But after I -c then npm run serve again, it keep throwing erro

14条回答
  •  醉话见心
    2020-12-31 04:21

    Ran into this error randomly with Vue CLI 3 using serve + version 4.1 with all the CLI plugins.

    Event though I have Disabled Cache enabled in the web browsers inspection tools I had to resolve this for local development by clearing a Cache Storage:

    Open Inspection Tools > Application (tab) > Cache Storage (tree) > Right Click Delete on an entry that has a label ending with http://localhost:8080.

    I did not try Right Click on Cache Storage > Refresh Caches, might also work?

    If you are having this issue in production, this is not the answer for you, you need to resolve this in some other manner to ensure your app functions for your end users who wont know to do this...

提交回复
热议问题