panyh
panyh
  • 发布:2019-05-10 17:10
  • 更新:2021-01-28 15:18
  • 阅读:6100

uniapp编译到小程序报错,ERROR TypeError: Cannot set property 'mpErrors' of undefined

分类:HBuilderX

uniapp编译到微信小程序报错,如下:
17:07:37.661 项目 'uniapp' 开始编译...
17:07:57.868 ERROR TypeError: Cannot set property 'mpErrors' of undefined
17:07:57.868 TypeError: Cannot set property 'mpErrors' of undefined
17:07:57.874 at Object.log (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\packages\mpvue-template-compiler\build.js:5109:27)
17:07:57.875 at compileToWxml (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\packages\mpvue-template-compiler\build.js:5128:21)
17:07:57.886 at compile (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\plugin\compile-to-template.js:33:9)
17:07:57.889 at Object.keys.forEach.filePath (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\plugin\generate-components-wxml.js:110:22)
17:07:57.895 at Array.forEach (<anonymous>)
17:07:57.896 at generateComponentsWxml (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\plugin\generate-components-wxml.js:72:26)
17:07:57.902 at Promise (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\plugin\index.js:83:11)
17:07:57.904 at new Promise (<anonymous>)
17:07:57.908 at compiler.hooks.emit.tapPromise.compilation (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\plugin\index.js:41:14)
17:07:57.910 at _err0 (eval at create (D:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:13:17)
17:07:57.917 at callback (D:\HBuilderX\plugins\uniapp-cli\node_modules\copy-webpack-plugin\dist\index.js:77:17)
17:07:57.918 at D:\HBuilderX\plugins\uniapp-cli\node_modules\copy-webpack-plugin\dist\index.js:118:24
17:07:57.923 at <anonymous>

2019-05-10 17:10 负责人:无 分享
已邀请:
6***@qq.com

6***@qq.com

同上,加上"usingComponents": true就能编译通过,请问楼主怎么解决的

  • panyh (作者)

    其实就是存在代码问题,仔细排查就可以了

    2019-05-23 15:55

  • 1***@1b7.cn

    回复 panyh: 什么代码问题,我今天和你一模一样

    2021-01-28 15:19

1***@1b7.cn

1***@1b7.cn

你怎么解决的

  • panyh (作者)

    平常的代码错误,具体已经忘记了

    2021-02-24 17:30

该问题目前已经被锁定, 无法添加新回复