在尝试编译抖音小程序时报错

题目描述

在尝试编译抖音小程序时报错

 TypeError: Path must be a string. Received undefined

at assertPath (path.js:28:11)

at Object.relative (path.js:1252:5)

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)

at Array.forEach (<anonymous>)

at generateComponent (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/plugin/generate-component.js:75:25)

at Promise (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/plugin/index-new.js:117:11)

at new Promise (<anonymous>)

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:103:16)

at _next1 (eval at create (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:17)

at _err1 (eval at create (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:26:1)

at Promise.all.catch.then (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/copy-webpack-plugin/dist/index.js:91:9)

at <anonymous>

题目来源及自己的思路

在编译过程中, /pages/good/detail 对应的组件直接报以上错误,如果在路由中注释掉该路由,则不会出现以上问题。我想知道该组件是否哪里发生了冲突

相关代码

文件过于太大, 无法定位具体的位置

你期待的结果是什么?实际看到的错误信息又是什么?

希望能给出解决思路(感谢各位大佬)

以上是 在尝试编译抖音小程序时报错 的全部内容, 来源链接: utcz.com/p/935455.html

回到顶部