uniapp-打包成微信小程序遇到的問題

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' 發(fā)布微信小程序失敗.

錯誤文件是:Error: Compile failed at components/description/index.vue

在這個文件我發(fā)現(xiàn)事件我是這樣寫的:
@click.stop="preview(img, item.compute(item))"
把這句改成:

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

就成功了
在寫事件的時候凉敲,不能反復套函數(shù)

?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末睦霎,一起剝皮案震驚了整個濱河市今艺,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌侯谁,老刑警劉巖,帶你破解...
    沈念sama閱讀 206,968評論 6 482
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件章钾,死亡現(xiàn)場離奇詭異墙贱,居然都是意外死亡,警方通過查閱死者的電腦和手機贱傀,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,601評論 2 382
  • 文/潘曉璐 我一進店門惨撇,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人府寒,你說我怎么就攤上這事魁衙。” “怎么了椰棘?”我有些...
    開封第一講書人閱讀 153,220評論 0 344
  • 文/不壞的土叔 我叫張陵纺棺,是天一觀的道長。 經常有香客問我邪狞,道長祷蝌,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 55,416評論 1 279
  • 正文 為了忘掉前任帆卓,我火速辦了婚禮巨朦,結果婚禮上米丘,老公的妹妹穿的比我還像新娘。我一直安慰自己糊啡,他們只是感情好拄查,可當我...
    茶點故事閱讀 64,425評論 5 374
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著棚蓄,像睡著了一般堕扶。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上梭依,一...
    開封第一講書人閱讀 49,144評論 1 285
  • 那天稍算,我揣著相機與錄音,去河邊找鬼役拴。 笑死糊探,一個胖子當著我的面吹牛,可吹牛的內容都是我干的河闰。 我是一名探鬼主播科平,決...
    沈念sama閱讀 38,432評論 3 401
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼姜性!你這毒婦竟也來了瞪慧?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 37,088評論 0 261
  • 序言:老撾萬榮一對情侶失蹤部念,失蹤者是張志新(化名)和其女友劉穎汞贸,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體印机,經...
    沈念sama閱讀 43,586評論 1 300
  • 正文 獨居荒郊野嶺守林人離奇死亡矢腻,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 36,028評論 2 325
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了射赛。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片多柑。...
    茶點故事閱讀 38,137評論 1 334
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖楣责,靈堂內的尸體忽然破棺而出竣灌,到底是詐尸還是另有隱情,我是刑警寧澤秆麸,帶...
    沈念sama閱讀 33,783評論 4 324
  • 正文 年R本政府宣布初嘹,位于F島的核電站,受9級特大地震影響沮趣,放射性物質發(fā)生泄漏屯烦。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 39,343評論 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望驻龟。 院中可真熱鬧温眉,春花似錦、人聲如沸翁狐。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,333評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽露懒。三九已至闯冷,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間懈词,已是汗流浹背窃躲。 一陣腳步聲響...
    開封第一講書人閱讀 31,559評論 1 262
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留钦睡,地道東北人。 一個月前我還...
    沈念sama閱讀 45,595評論 2 355
  • 正文 我出身青樓躁倒,卻偏偏與公主長得像荞怒,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子秧秉,可洞房花燭夜當晚...
    茶點故事閱讀 42,901評論 2 345

推薦閱讀更多精彩內容