2***@qq.com
2***@qq.com
  • 发布:2019-12-07 18:42
  • 更新:2020-09-24 09:59
  • 阅读:9018

value.trim is not a function这种问题到底咋排查

分类:nvue
 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/templateLoader.js):  
18:26:33.564 TypeError: value.trim is not a function  
18:26:33.582     at addHandler (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1201:48)  
18:26:33.603     at processAttrs (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:2133:9)  
18:26:33.622     at processElement (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1737:3)  
18:26:33.623     at closeElement (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1391:17)  
18:26:33.644     at Object.end (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1595:7)  
18:26:33.645     at parseEndTag (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:531:19)  
18:26:33.664     at parseHTML (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:347:11)  
18:26:33.683     at parse (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1479:3)  
18:26:33.688     at baseCompile (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:4386:13)  
18:26:33.707     at Object.compile (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:4361:22)  
18:26:33.727     at compile (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:5031:25)  
18:26:33.728     at actuallyCompile (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\compileTemplate.js:69:84)  
18:26:33.747     at compileTemplate (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\compileTemplate.js:31:16)  
18:26:33.767     at Object.module.exports (D:\HBuilderX.1.9.9.20190522.full\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\templateLoader.js:46:20)

nvue项目运行起来就报错,肯定有什么地方存在问题,但是这种错你要不要报的详细一些嘛,这个错误定位不到哪里有问题的呀

2019-12-07 18:42 负责人:无 分享
已邀请:
DCloud_uni-ad_HDX

DCloud_uni-ad_HDX

  1. 移除一些页面,确定哪个页面导致的
  2. 提供一个简单的示例工程,我们分析看看
x***@126.com

x***@126.com

文本要写在text内,要不就报这个错误

x***@126.com

x***@126.com

或者template中使用了不兼容的语法

liuzhuolin

liuzhuolin

TypeError: value.trim is not a function
at addHandler (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1203:48)
at processAttrs (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:2136:9)
at processElement (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1740:3)
at closeElement (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1393:17)
at Object.end (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1598:7)
at parseEndTag (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:533:19)
at parseHTML (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:347:11)
at parse (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:1481:3)
at baseCompile (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:4395:13)
at Object.compile (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:4370:22)
at compile (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-template-compiler\build.js:5040:25)
at compileTemplate (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\auto-components.js:75:15)
at compiler.compile (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\build\vue-loader.conf.js:115:10)
at actuallyCompile (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\packages\@vue\component-compiler-utils\dist\compileTemplate.js:70:96)
at compileTemplate (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\packages\@vue\component-compiler-utils\dist\compileTemplate.js:31:16)
at Object.module.exports (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\packages\vue-loader\lib\loaders\templateLoader.js:46:20)
at Object.<anonymous> (http://192.168.199.110:8091/source/file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/pages/index/indexbug.js:4346:7)
at webpack_require (http://192.168.199.110:8091/source/file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/pages/index/indexbug.js:21:30)
at Module.<anonymous> (http://192.168.199.110:8091/source/file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/pages/index/indexbug.js:4333:615)
at
webpack_require
(http://192.168.199.110:8091/source/file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/pages/index/indexbug.js:21:30)
at eval (webpack-internal:///41:2:99)
at Module.<anonymous> (http://192.168.199.110:8091/source/file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/pages/index/indexbug.js:4321:1)
at webpack_require (http://192.168.199.110:8091/source/file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/pages/index/indexbug.js:21:30)
at eval (webpack-internal:///38:9:37)
at Object.<anonymous> (http://192.168.199.110:8091/source/file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/pages/index/indexbug.js:4288:1)
at
webpack_require
(http://192.168.199.110:8091/source/file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/pages/index/indexbug.js:21:30)

苍山暮色烟雨迟

苍山暮色烟雨迟

nvue中不要直接写

@click.stop

要改成

@click.stop=""

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