[HBuilder] 08:35:44.124 项目 'binfo.xxqa.mobile.test' 开始发布h5...
[HBuilder] 08:35:44.124 项目 'binfo.xxqa.mobile.test' 开始编译...
[HBuilder] 08:35:44.761 正在编译中...
[HBuilder] 08:36:04.411 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.411 语法错误: Unexpected token (18:1)
[HBuilder] 08:36:04.436 at pages/myPoints/myPoints.vue:18
[HBuilder] 08:36:04.437 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.462 语法错误: Unexpected token (42:1)
[HBuilder] 08:36:04.462 at pages/examForm/bpExamForm.vue:42
[HBuilder] 08:36:04.486 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.486 语法错误: Unexpected token (42:1)
[HBuilder] 08:36:04.496 at pages/examForm/chExamForm.vue:42
[HBuilder] 08:36:04.497 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.509 语法错误: Unexpected token (42:1)
[HBuilder] 08:36:04.509 at pages/examForm/specialExamForm.vue:42
[HBuilder] 08:36:04.521 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.521 语法错误: Unexpected token (45:1)
[HBuilder] 08:36:04.533 at pages/examForm/cgExamList.vue:45
[HBuilder] 08:36:04.543 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.543 语法错误: Unexpected token (45:1)
[HBuilder] 08:36:04.553 at pages/examForm/personalPractice.vue:45
[HBuilder] 08:36:04.561 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.561 语法错误: Unexpected token (45:1)
[HBuilder] 08:36:04.572 at pages/examForm/weekExamForm.vue:45
[HBuilder] 08:36:04.573 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.583 语法错误: Unexpected token (45:1)
[HBuilder] 08:36:04.584 at pages/examForm/examForm.vue:45
[HBuilder] 08:36:04.592 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.602 语法错误: Unexpected token (51:1)
[HBuilder] 08:36:04.603 at pages/examForm/xfExamForm.vue:51
[HBuilder] 08:36:04.611 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 08:36:04.611 语法错误: Unexpected token (51:1)
[HBuilder] 08:36:04.624 at pages/examForm/safeRuleExamForm.vue:51
[HBuilder] 08:36:04.634 ERROR Build failed with errors.
[HBuilder] 08:36:04.635 项目 'binfo.xxqa.mobile.test' 发布h5失败.
- 发布:2020-09-27 08:38
- 更新:2023-10-02 00:47
- 阅读:10198
最佳回复
吾逍遥 - 北京九思自然科技
问题描述
我今天也是更新了到HBuilderX2.9-Alpha遇到同样问题,2.8.12正式版编译成微信小程序、app和H5正常,而2.9的Alpha版编译APP和微信小程序没问题,但编译成H5就时就报如下相同错误:
13:55:41.524 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue->
loader/lib/loaders/templateLoader.js):
13:55:41.524 语法错误: Unexpected token (11:1)
13:55:41.529 at uview-ui\components\u-tag\u-tag.vue:11
解决问题
根据提示我注释u-tag.vue中template是可以编译通过,但这明显是不符合实际要求,就找到templateLoader.js,用2.8.12对就文件替换再编译也是失败。最后通过我测试终于找到出问题的文件,就是plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\lib\h5\compiler-options.js,使用2.8.12版替换2.9相应文件就编译成功。
具体不同截图如下:
渣渣前端
您好,我更新版本以后(2.9.3 以及2.8.8)h5运行打包 小程序人脸核身的组件均会报错Unexpected token ... 能不能麻烦看下呢
2020-10-22 19:31