老版本的HX编译器不会报错 ,具体从那一个版本开始报错就不清楚了,2.1.1版本是没问题的。自定义编译模式/非自定义编译模式已经试过了,不是这个问题。
Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/templateLoader.js):
10:13:40.744 TypeError: value.trim is not a function
10:13:40.767 at addHandler (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1201:48)
10:13:40.769 at processAttrs (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:2133:9)
10:13:40.798 at processElement (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1737:3)
10:13:40.799 at closeElement (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1391:17)
10:13:40.829 at Object.end (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1595:7)
10:13:40.830 at parseEndTag (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:531:19)
10:13:40.858 at parseHTML (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:347:11)
10:13:40.860 at parse (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:1479:3)
10:13:40.890 at baseCompile (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:4386:13)
10:13:40.891 at Object.compile (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:4361:22)
10:13:40.921 at compile (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/weex-template-compiler/build.js:5031:25)
10:13:40.950 at actuallyCompile (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/compileTemplate.js:69:84)
10:13:40.951 at compileTemplate (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/compileTemplate.js:31:16)
10:13:40.979 at Object.module.exports (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/templateLoader.js:46:20)
10:13:51.020 DONE Build complete. Watching for changes...
10:13:51.020 项目 'DMS' 编译成功.
10:13:51.043 ERROR Build failed with errors.
4 个回复
cur
解决了吗,我这发现是在nvue页面引用了popup组件,一引入必报这个错
cur
大佬解决了的话,求教 q 1397250963
w***@163.com (作者)
没有解决,用的老版本开发编译了
2019-12-26 16:08
x***@126.com
估计是你在nvue文件中 文本不是写在 text内的原因吧~~~~
x***@126.com
或者template中使用了不兼容的语法