美文网首页
uniapp-打包成微信小程序遇到的问题

uniapp-打包成微信小程序遇到的问题

作者: meryin | 来源:发表于2023-01-29 15:32 被阅读0次

TypeError: Property value expected type of string but got undefined

[HBuilder] 11:35:05.377 TypeError: Property value expected type of string but got undefined
[HBuilder] 11:35:05.385     at Object.validate (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/definitions/utils.js:134:13)
[HBuilder] 11:35:05.397     at validateField (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/validators/validate.js:21:9)
[HBuilder] 11:35:05.398     at validate (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/validators/validate.js:15:3)
[HBuilder] 11:35:05.408     at validateNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/builders/validateNode.js:12:27)
[HBuilder] 11:35:05.409     at Object.stringLiteral (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/builders/generated/index.js:432:36)
[HBuilder] 11:35:05.422     at parseEventByCallExpression (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:177:30)
[HBuilder] 11:35:05.434     at /Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:318:15
[HBuilder] 11:35:05.448     at Array.forEach (<anonymous>)
[HBuilder] 11:35:05.458     at /Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:317:28
[HBuilder] 11:35:05.471     at Array.forEach (<anonymous>)
[HBuilder] 11:35:05.471     at parseEvent (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:258:15)
[HBuilder] 11:35:05.482     at _processEvent (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:441:9)
[HBuilder] 11:35:05.483     at processEvent (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:502:5)
[HBuilder] 11:35:05.491     at /Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/index.js:40:5
[HBuilder] 11:35:05.503     at Array.forEach (<anonymous>)
[HBuilder] 11:35:05.503     at traverseData (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/index.js:39:13)
[HBuilder] 11:35:05.518     at Object.CallExpression (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/visitor.js:191:58)
[HBuilder] 11:35:05.518     at NodePath._call (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:46:20)
[HBuilder] 11:35:05.531     at NodePath.call (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:36:17)
[HBuilder] 11:35:05.539     at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:84:31)
[HBuilder] 11:35:05.539     at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.555     at TraversalContext.visitSingle (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:72:19)
[HBuilder] 11:35:05.556     at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:121:19)
[HBuilder] 11:35:05.573     at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:05.574     at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:90:52)
[HBuilder] 11:35:05.585     at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.599     at TraversalContext.visitMultiple (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:67:17)
[HBuilder] 11:35:05.608     at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:119:19)
[HBuilder] 11:35:05.619     at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:05.620     at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:90:52)
[HBuilder] 11:35:05.631     at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.631     at TraversalContext.visitSingle (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:72:19)
[HBuilder] 11:35:05.640     at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:121:19)
[HBuilder] 11:35:05.652     at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:05.664     at traverse (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/index.js:50:34)
[HBuilder] 11:35:05.665     at NodePath.traverse (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/index.js:109:24)
[HBuilder] 11:35:05.672     at traverseRenderList (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/render-list.js:157:22)
[HBuilder] 11:35:05.686     at Object.CallExpression (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/visitor.js:208:11)
[HBuilder] 11:35:05.700     at NodePath._call (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:46:20)
[HBuilder] 11:35:05.701     at NodePath.call (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:36:17)
[HBuilder] 11:35:05.715     at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:84:31)
[HBuilder] 11:35:05.715     at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.724     at TraversalContext.visitSingle (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:72:19)
[HBuilder] 11:35:05.725     at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:121:19)
[HBuilder] 11:35:05.740     at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:05.741     at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:90:52)
[HBuilder] 11:35:05.758     at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.758     at TraversalContext.visitMultiple (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:67:17)
[HBuilder] 11:35:05.769     at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:119:19)
[HBuilder] 11:35:05.772     at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:24.580 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 11:35:24.591 Error: Compile failed at components/description/index.vue
[HBuilder] 11:35:24.603     at compile (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/index.js:149:13)
[HBuilder] 11:35:24.614     at actuallyCompile (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/compileTemplate.js:70:96)
[HBuilder] 11:35:24.615     at compileTemplate (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/compileTemplate.js:31:16)
[HBuilder] 11:35:24.624     at Object.<anonymous> (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js:46:20)
[HBuilder] 11:35:24.624  ERROR  Build failed with errors.
[HBuilder] 11:35:24.657 项目 'tx_carling_buyer_app' 发布微信小程序失败.

错误文件是:Error: Compile failed at components/description/index.vue

在这个文件我发现事件我是这样写的:
@click.stop="preview(img, item.compute(item))"
把这句改成:

@click.stop="preview(img, item)"

就成功了
在写事件的时候,不能反复套函数

相关文章

  • 开发总结

    微信小程序遇到的问题: ===========================================

  • 一篇文章为你深度解析HTTPS 协议

    一、微信小程序接入的困境 农历新年将至,微信小程序也如期发布,开发者在接入微信小程序过程中,会遇到以下问题: 小程...

  • 微信小程序遇到的问题

    1.登录的流程: (1)wx.login获取临时登录凭证code. (2)wx.getSetting(OBJECT...

  • 使用antmove微信小程序转换支付宝小程序

    本次有需求 直接一直微信小程序到支付宝小程序。记录一下使用antmove转换遇到的问题 支付宝小程序与微信小程序的...

  • 微信小程序笔记心得

    微信小程序问题汇总及详解《一》form表单 微信小程序问题汇总及详解《二》tab切换 微信小程序问题汇总及详解《三...

  • 小程序replace()正则表达式

    遇到的问题 :在微信小程序里面用到replace(//g,'')报错image.png 解决方法: 原因是微信小程...

  • 微信小程序实战

    微信小程序实战 有问题可以扫码加我微信,有偿解决问题。承接小程序开发。微信小程序开发交流qq群 870222928...

  • 小程序反编译方法

    看了很多反编译小程序、找回微信小程序源码很多教程,各种问题导致都没法正常使用。微信版本升级后,会遇到各种报错, 以...

  • 微信小程序开发之-Https免费证书配置

    微信小程序开发之-Https免费证书配置 有问题可以扫码加我微信,有偿解决问题。承接小程序开发。微信小程序开发交流...

  • laravel 小程序登录 session问题

    问题描述 当微信小程序开发中用laravel做后台的时候一定会遇到登录session的问题 因为小程序没有cook...

网友评论

      本文标题:uniapp-打包成微信小程序遇到的问题

      本文链接:https://www.haomeiwen.com/subject/onlphdtx.html