1***@qq.com
1***@qq.com
  • 发布:2021-03-12 17:53
  • 更新:2021-03-15 11:45
  • 阅读:1066

uniapp 编译头条小程序失败。 TypeError: Path must be a string. Received undefined

分类:uni-app

产品分类: uniapp/小程序/字节跳动

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: Mac2020

HBuilderX类型: 正式

HBuilderX版本号: 3.0.5

第三方开发者工具版本号: 最新

基础库版本号: 最新

项目创建方式: HBuilderX

操作步骤:

ERROR TypeError: Path must be a string. Received undefined
17:39:36.188 TypeError: Path must be a string. Received undefined
17:39:36.188 at assertPath (path.js:28:11)
17:39:36.195 at Object.relative (path.js:1252:5)
17:39:36.195 at Object.keys.forEach.name (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/plugin/generate-component.js:158:52)
17:39:36.201 at Array.forEach (<anonymous>)
17:39:36.201 at generateComponent (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/plugin/generate-component.js:76:25)
17:39:36.209 at Promise (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/plugin/index-new.js:84:11)
17:39:36.210 at new Promise (<anonymous>)
17:39:36.217 at compiler.hooks.emit.tapPromise.compilation (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/plugin/index-new.js:72:16)
17:39:36.225 at _next1 (eval at create (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:17)
17:39:36.232 at _err1 (eval at create (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:26:1)
17:39:36.241 at Promise.all.catch.then (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/copy-webpack-plugin/dist/index.js:91:9)
17:39:36.241 at <anonymous>

预期结果:

编译成功

实际结果:

编译失败 ERROR TypeError: Path must be a string. Received undefined
17:39:36.188 TypeError: Path must be a string. Received undefined

bug描述:

抖音小程序编译 失败

2021-03-12 17:53 负责人:无 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

应该某种写法超出了编译器的预期,导致框架内部报错,麻烦示例工程提供一下

该问题目前已经被锁定, 无法添加新回复