米斯特郭
米斯特郭
  • 发布:2019-04-16 05:59
  • 更新:2019-04-16 10:44
  • 阅读:226

【报Bug】1.9.0.2 自定义组件模式 报错!

分类:HBuilderX

开启 "usingComponents": true, 后报错信息如一下.....

23:55:25.677 Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
23:55:25.679 TypeError: Cannot read property 'charAt' of undefined
23:55:25.700 at parseEvent (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:169:20)
23:55:25.712 at _processEvent (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:208:9)
23:55:25.714 at processEvent (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:252:5)
23:55:25.728 at processes.forEach.process (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\data\index.js:30:5)
23:55:25.730 at Array.forEach (<anonymous>)
23:55:25.745 at traverseData (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\data\index.js:29:13)
23:55:25.747 at Object.CallExpression (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\lib\script\traverse\visitor.js:71:56)
23:55:25.759 at NodePath._call (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\path\context.js:53:20)
23:55:25.761 at NodePath.call (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\path\context.js:40:17)
23:55:25.774 at NodePath.visit (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\path\context.js:88:12)
23:55:25.776 at TraversalContext.visitQueue (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\context.js:118:16)
23:55:25.788 at TraversalContext.visitSingle (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\context.js:90:19)
23:55:25.791 at TraversalContext.visit (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\context.js:146:19)
23:55:25.804 at Function.traverse.node (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\index.js:94:17)
23:55:25.807 at NodePath.visit (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\path\context.js:95:18)
23:55:25.824 at TraversalContext.visitQueue (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\uni-template-compiler\node_modules\@babel\traverse\lib\context.js:118:16)
23:55:25.839 ERROR Error: Build failed with errors.
23:55:25.841 Error: Build failed with errors.
23:55:25.854 at webpack (C:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-uni\commands\build.js:104:23)
23:55:25.857 at Watching.compiler.watch [as handler] (C:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\MultiCompiler.js:218:10)
23:55:25.869 at compiler.hooks.done.callAsync (C:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:98:9)
23:55:25.872 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:33:1)
23:55:25.885 at AsyncSeriesHook.lazyCompileHook (C:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\Hook.js:154:20)
23:55:25.888 at Watching._done (C:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:97:28)
23:55:25.901 at compiler.emitRecords.err (C:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:72:19)
23:55:25.904 at Compiler.emitRecords (C:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Compiler.js:375:39)
23:55:25.916 at compiler.emitAssets.err (C:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:53:20)
23:55:25.918 at hooks.afterEmit.callAsync.err (C:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Compiler.js:361:14)
23:55:25.932 at _err0 (eval at create (C:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:20:1)
23:55:25.944 at callback (C:\HBuilderX\plugins\uniapp-cli\node_modules\copy-webpack-plugin\dist\index.js:126:17)
23:55:25.946 at afterEmit (C:\HBuilderX\plugins\uniapp-cli\node_modules\copy-webpack-plugin\dist\index.js:220:13)
23:55:25.959 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:7:1)
23:55:25.962 at AsyncSeriesHook.lazyCompileHook (C:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\Hook.js:154:20)
23:55:25.974 at asyncLib.forEach.err (C:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Compiler.js:358:27)

2019-04-16 05:59 分享
已邀请:
786039294@qq.com

786039294@qq.com

Cannot read property 'charAt' of undefined 建议查一下报错页面的charAt这个变量

Trust

Trust - 少说废话

请上传完整的可以重现问题的最简项目。

要回复问题请先登录注册