在vue3.x中遇到的报错:Uncaught (in promise) Error: Couldn‘t resolve component “****“ at “/*****“

在这里插入图片描述

Uncaught (in promise) Error: Couldn’t resolve component “default” at “/about”
at eval (vue-router.esm-bundler.js?6c02:1990)

异步异常(字面理解)

配置根目录下的vue.comfig.js
在这里插入图片描述
原先我是写成这样(错***)
在这里插入图片描述

查看里面的publicPath: "/", 对,不能有.

module.exports = {
    
    
  publicPath: "/", 
}

最后记得重新npm run serve一下!!!

猜你喜欢

转载自blog.csdn.net/weixin_45773503/article/details/113761414