报错信息:
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)
原因:
当出现编译错误或警告时,在浏览器中显示全屏覆盖。
解决方法:
在vue.config.js中添加如下配置,重启项目即可文章来源:https://www.toymoban.com/news/detail-751563.html
module.exports = defineConfig({
devServer: {
client: {
overlay: false,
},
}
})
https://webpack.docschina.org/configuration/dev-server/#overlay文章来源地址https://www.toymoban.com/news/detail-751563.html
到了这里,关于vue前端页面弹出红色报错遮罩层 Uncaught runtime errors:at handleError (webpack-internal:///./node_modules/webpack的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!