当前位置: 代码迷 >> 综合 >> 项目上线Bug之Uncaught SyntaxError: Unexpected token ‘!‘
  详细解决方案

项目上线Bug之Uncaught SyntaxError: Unexpected token ‘!‘

热度:42   发布时间:2023-11-18 12:43:24.0

Uncaught SyntaxError: Unexpected token ‘!’

报错原因:
缺少router模块
报错环境:
为了解决重复定义路由问题,在packge.json中删除了定义的router路由版本,并删除router的依赖包导致报错
解决方案:
重新安装router依赖包,无论线上线下都采用引入方式的vue-router就可以了

  相关解决方案