小邱哈哈哈哈哈
小邱哈哈哈哈哈
  • 发布:2023-07-05 19:39
  • 更新:2023-07-25 10:06
  • 阅读:327

编译小程序时报错Error: You passed `path.replaceWith()` a falsy node, use `path.remove()` instead

分类:uni-app

19:37:04.890 Error: You passed path.replaceWith() a falsy node, use path.remove() instead
19:37:04.890 at NodePath.replaceWith (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\replacement.js:91:11)
19:37:04.907 at processStyle (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\data\style.js:129:22)
19:37:04.907 at D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\data\index.js:40:5
19:37:04.927 at Array.forEach (<anonymous>)
19:37:04.947 at traverseData (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\data\index.js:39:13)
19:37:04.975 at Object.CallExpression (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\visitor.js:205:58)
19:37:04.979 at NodePath._call (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:46:20)
19:37:05.007 at NodePath.call (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:36:17)
19:37:05.007 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:84:31)
19:37:05.039 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:05.039 at TraversalContext.visitSingle (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:72:19)
19:37:05.071 at TraversalContext.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:121:19)
19:37:05.071 at traverseNode (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\traverse-node.js:18:17)
19:37:05.111 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:52)
19:37:05.115 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:05.159 at TraversalContext.visitMultiple (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:67:17)
19:37:05.159 at TraversalContext.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:119:19)
19:37:05.196 at traverseNode (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\traverse-node.js:18:17)
19:37:05.196 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:52)
19:37:05.278 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:05.279 at TraversalContext.visitMultiple (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:67:17)
19:37:05.360 at TraversalContext.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:119:19)
19:37:05.361 at traverseNode (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\traverse-node.js:18:17)
19:37:05.425 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:52)
19:37:05.426 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:05.475 at TraversalContext.visitSingle (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:72:19)
19:37:05.476 at TraversalContext.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:121:19)
19:37:05.522 at traverseNode (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\traverse-node.js:18:17)
19:37:05.523 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:52)
19:37:05.562 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:05.562 at TraversalContext.visitMultiple (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:67:17)
19:37:05.602 at TraversalContext.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:119:19)
19:37:05.602 at traverseNode (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\traverse-node.js:18:17)
19:37:05.642 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:52)
19:37:05.642 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:05.690 at TraversalContext.visitSingle (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:72:19)
19:37:05.694 at TraversalContext.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:121:19)
19:37:05.840 at traverseNode (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\traverse-node.js:18:17)
19:37:05.842 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:52)
19:37:05.917 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:05.917 at TraversalContext.visitMultiple (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:67:17)
19:37:05.984 at TraversalContext.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:119:19)
19:37:05.988 at traverseNode (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\traverse-node.js:18:17)
19:37:06.053 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:52)
19:37:06.053 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:06.109 at TraversalContext.visitSingle (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:72:19)
19:37:06.113 at TraversalContext.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:121:19)
19:37:06.173 at traverseNode (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\traverse-node.js:18:17)
19:37:06.173 at NodePath.visit (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:52)
19:37:06.238 at TraversalContext.visitQueue (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:96:16)
19:37:19.664 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
19:37:19.664 Error: Compile failed at uni_modules/uview-ui/components/u-navbar/u-navbar.vue
19:37:19.708 at compile (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\index.js:149:13)
19:37:19.708 at actuallyCompile (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\packages\@vue\component-compiler-utils\dist\compileTemplate.js:70:96)
19:37:19.760 at compileTemplate (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\packages\@vue\component-compiler-utils\dist\compileTemplate.js:31:16)
19:37:19.804 at Object.<anonymous> (D:\tools\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\packages\vue-loader\lib\loaders\templateLoader.js:46:20)
19:37:20.185 ERROR Build failed with errors.

啥问题啊?快疯了...

2023-07-05 19:39 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com

path.replaceWith() a falsy node, use path.remove() instead
我也遇到同样的问题

2***@qq.com

2***@qq.com

:style="[]"
我是加了这个属性 导致的,你可以参考下

要回复问题请先登录注册