小螺丝
小螺丝
  • 发布:2023-05-28 16:19
  • 更新:2023-06-02 16:59
  • 阅读:445

小程序突然无法编译了?

分类:HBuilderX

[广告] 16:16:07.784 DCloud 2023新春招聘开启,欢迎前端、Android、C++/QT来投简历! 详情点击
16:16:07.815 项目 'uniapp-zhmd' 开始编译...
16:16:08.707 请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不及发行模式。若要正式发布,请点击发行菜单或使用cli发布命令进行发布
16:16:08.718 小程序各家浏览器内核及自定义组件实现机制存在差异,可能存在样式布局兼容问题,参考:https://uniapp.dcloud.io/matter?id=mp
16:16:08.723 正在编译中...
16:16:21.917 TypeError: @babel/template placeholder "JSON": Property property of MemberExpression expected node to be of a type ["Identifier","PrivateName"] but instead got undefined
16:16:21.922 at validate (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/node_modules/@babel/types/lib/definitions/utils.js:112:11)
16:16:21.923 at Object.validator [as validate] (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/node_modules/@babel/types/lib/definitions/core.js:521:11)
16:16:21.928 at validateField (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/node_modules/@babel/types/lib/validators/validate.js:21:9)
16:16:21.935 at validate (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/node_modules/@babel/types/lib/validators/validate.js:15:3)
16:16:21.941 at applyReplacement (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/lib/populate.js:103:5)
16:16:21.941 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/lib/populate.js:40:7
16:16:21.948 at Array.forEach (<anonymous>)
16:16:21.957 at populatePlaceholders (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/lib/populate.js:38:43)
16:16:21.964 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/lib/string.js:16:51
16:16:21.965 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/node_modules/@babel/template/lib/builder.js:61:14
16:16:21.973 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:430:59
16:16:21.973 at Array.forEach (<anonymous>)
16:16:21.981 at parseEvent (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:283:15)
16:16:21.990 at _processEvent (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:473:9)
16:16:21.990 at processEvent (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:534:5)
16:16:21.999 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/index.js:40:5
16:16:21.999 at Array.forEach (<anonymous>)
16:16:22.009 at traverseData (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/index.js:39:13)
16:16:22.020 at Object.CallExpression (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/visitor.js:205:58)
16:16:22.020 at NodePath._call (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:46:20)
16:16:22.030 at NodePath.call (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:36:17)
16:16:22.041 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:84:31)
16:16:22.052 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.052 at TraversalContext.visitSingle (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:72:19)
16:16:22.065 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:121:19)
16:16:22.065 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.076 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:90:52)
16:16:22.089 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.090 at TraversalContext.visitMultiple (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:67:17)
16:16:22.101 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:119:19)
16:16:22.113 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.125 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:90:52)
16:16:22.125 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.136 at TraversalContext.visitSingle (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:72:19)
16:16:22.148 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:121:19)
16:16:22.160 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.160 at traverse (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/index.js:50:34)
16:16:22.173 at NodePath.traverse (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/index.js:109:24)
16:16:22.184 at traverseRenderList (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/render-list.js:165:22)
16:16:22.197 at Object.CallExpression (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/visitor.js:222:11)
16:16:22.210 at NodePath._call (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:46:20)
16:16:22.210 at NodePath.call (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:36:17)
16:16:22.224 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:84:31)
16:16:22.239 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.252 at TraversalContext.visitMultiple (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:67:17)
16:16:22.252 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:119:19)
16:16:22.267 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.279 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:90:52)
16:16:22.294 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.294 at TraversalContext.visitMultiple (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:67:17)
16:16:22.308 =============
16:16:22.321 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:430:45
16:16:22.335 at Array.forEach (<anonymous>)
16:16:22.335 at parseEvent (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:283:15)
16:16:22.349 at _processEvent (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:473:9)
16:16:22.362 at processEvent (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:534:5)
16:16:22.376 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/index.js:40:5
16:16:22.376 at Array.forEach (<anonymous>)
16:16:22.388 at traverseData (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/index.js:39:13)
16:16:22.400 at Object.CallExpression (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/visitor.js:205:58)
16:16:22.413 at NodePath._call (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:46:20)
16:16:22.426 at NodePath.call (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:36:17)
16:16:22.440 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:84:31)
16:16:22.452 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.465 at TraversalContext.visitSingle (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:72:19)
16:16:22.465 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:121:19)
16:16:22.478 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.490 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:90:52)
16:16:22.504 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.504 at TraversalContext.visitMultiple (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:67:17)
16:16:22.518 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:119:19)
16:16:22.531 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.543 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:90:52)
16:16:22.544 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.556 at TraversalContext.visitSingle (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:72:19)
16:16:22.568 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:121:19)
16:16:22.582 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.582 at traverse (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/index.js:50:34)
16:16:22.595 at NodePath.traverse (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/index.js:109:24)
16:16:22.607 at traverseRenderList (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/render-list.js:165:22)
16:16:22.619 at Object.CallExpression (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/visitor.js:222:11)
16:16:22.620 at NodePath._call (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:46:20)
16:16:22.632 at NodePath.call (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:36:17)
16:16:22.632 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:84:31)
16:16:22.645 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.657 at TraversalContext.visitMultiple (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:67:17)
16:16:22.658 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:119:19)
16:16:22.671 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.684 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:90:52)
16:16:22.696 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.697 at TraversalContext.visitMultiple (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:67:17)
16:16:22.710 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:119:19)
16:16:22.723 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.736 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:90:52)
16:16:22.736 at TraversalContext.visitQueue (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:96:16)
16:16:22.750 at TraversalContext.visitMultiple (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:67:17)
16:16:22.762 at TraversalContext.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/context.js:119:19)
16:16:22.775 at traverseNode (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
16:16:22.776 at NodePath.visit (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@babel/traverse/lib/path/context.js:90:52)
16:16:31.743 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
16:16:31.755 Error: Compile failed at components/ty/goods-appraise/index.vue
16:16:31.756 at compile (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/uni-template-compiler/lib/index.js:149:13)
16:16:31.772 at actuallyCompile (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/compileTemplate.js:70:96)
16:16:31.772 at compileTemplate (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/compileTemplate.js:31:16)
16:16:31.787 at Object.<anonymous> (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js:46:20)
16:16:31.800 TypeError: Cannot read properties of undefined (reading 'includes')
16:16:31.812 at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/bin/uniapp-cli.js:53:21
16:16:31.813 at runMicrotasks (<anonymous>)
16:16:31.831 at processTicksAndRejections (node:internal/process/task_queues:96:5)
16:16:31.926 Error: getaddrinfo ENOTFOUND 96f0e031-f37a-48ef-84c7-2023f6360c0a.bspapp.com
16:16:31.926 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26) {
16:16:31.940 errno: -3008,
16:16:31.940 code: 'ENOTFOUND',
16:16:31.954 syscall: 'getaddrinfo',
16:16:31.967 hostname: '96f0e031-f37a-48ef-84c7-2023f6360c0a.bspapp.com'
16:16:31.982 }

2023-05-28 16:19 负责人:DCloud_UNI_GSQ 分享
已邀请:
小螺丝

小螺丝 (作者)

升级编辑器后,报一堆错,无法编译小程序。

118

118

换个基础库,别用最新的, 或者你退回老版本

DCloud_UNI_WZF

DCloud_UNI_WZF

HBuilderX 版本是多少?提供下测试工程,这边排查下,谢谢

  • s***@yinmaisoft.com

    我用2.8编译器也不行,升级到 3.8.3.20230526还是一样的报错

    2023-05-29 17:02

  • DCloud_UNI_WZF

    回复 s***@yinmaisoft.com: vue2 运行到微信小程序平台吗? 如果是的话检查 template 事件绑定中是否存在 JSON.stringify,如存在,可暂时将相关逻辑放到 methods event 中调用规避

    2023-05-29 17:18

DCloud_UNI_GSQ

DCloud_UNI_GSQ

HBuilderX 3.8.4 已修复

  • feixuelove

    3.8.7的又出现这个问题了!请关注处理 ,谢谢

    2023-07-07 08:46

要回复问题请先登录注册