Scenario
form.clientScriptFilePath
is used in User Event for loading a client script under record view event. The error occurs when view
event is fired.
Steps to Locate the Bug
- the file path is correct, which is proven by referencing the client script file in
define[]
without a problem - set the file path to a wrong value, the error shows MODULE DOES NOT EXIST but with the given wrong file path
Solution
use form.clientScriptFileId
instead
场景
在User Event中的VIEW阶段使用了form.clientScriptFilePath
。当view事件触发时,报这个错误。
定位bug的步骤
- 在
define[]
中引用client脚本是没有报错的,所以文件路径肯定对的 - 把文件路径故意改错,MODULE DOES NOT EXIST的错误信息会包含已有的client脚本文件的路径错误。
解决
用 form.clientScriptFileId
作为代替方案
Comments