The “path“ argument must be of type string. Received undefined
·
The “path” argument must be of type string. Received undefined
"path"参数必须是字符串类型。收到未定义
我是因为打包修改了项目的打包路径,导致了这个错误
assetsPublicPath: 代表打包后,index.html里面引用资源的相对地址
assetsSubDirectory: 除了 index.html 之外的静态资源要存放的路径
我的解决方法是
vue2:
在config/index.js
assetsSubDirectory: ‘static’,
assetsPublicPath: ‘/’,
vue3中:
在vue.config.js
publicPath: ‘./’,
//构建时的输出目录
outputDir: ‘html’,
//放置静态资源的目录
assetsDir: ‘static’,
//html 的输出路径
indexPath: ‘index.html’,
我的解决方法是这样的,如果有更好的解决方法可以告诉我!
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)