如何处理UI5一般性错误Cannot read property md of undefined

版权声明:本文为博主汪子熙原创文章,未经博主允许不得转载。 https://blog.csdn.net/i042416/article/details/89711028

Suppose you have encountered with this error when you launch your Fiori application:
Uncaught Error: failed to load ‘FioriTest/view/Master.controller.js’ from ./view/Master.controller.js: TypeError: Cannot read property ‘md’ of undefined
The error is raised in framework file UIComponent-dbg.js. In most of the case the error is not in framework side, but due to wrong code in your own application code.

clipboard1

1). click the hyperlink:

clipboard2

2). You will be automatically navigated to the code where the exception - the error message is raised.
Set a breakpoint here:

clipboard3

3). re-launch your Fiori application, the breakpoint is triggered, you can then find the detail callstack by evaluating the variable e:

clipboard4
clipboard5

Search in Opportunity application, and we realized that there is a missing require statement:
clipboard6

after the require statement above is added, the error message changes:
clipboard7
clipboard8

so we are still lack of another necessary require statement, and this is the root cause of the error message. Once we add the missing require statement, issue will be resolved.
clipboard9

扫描二维码关注公众号,回复: 6078074 查看本文章

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

猜你喜欢

转载自blog.csdn.net/i042416/article/details/89711028