当前位置:   article > 正文

vue前端页面弹出红色报错遮罩层 Uncaught runtime errors:at handleError (webpack-internal:///./node_modules/webpack_unknown promise rejection reason

unknown promise rejection reason

报错信息:

Uncaught runtime errors:
×
ERROR
Unknown promise rejection reason
    at handleError (webpack-internal:///./node_modules/webpack-dev-server/client/overlay.js:296:58)
    at eval (webpack-internal:///./node_modules/webpack-dev-server/client/overlay.js:319:7)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

原因:
当出现编译错误或警告时,在浏览器中显示全屏覆盖。
解决方法:
在vue.config.js中添加如下配置,重启项目即可

module.exports = defineConfig({
  devServer: {
    client: {
      overlay: false,
    },
  }

})

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

https://webpack.docschina.org/configuration/dev-server/#overlay

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/681125
推荐阅读
相关标签
  

闽ICP备14008679号