📝optimize FAQ (#2673)
This commit is contained in:
parent
bcaa505944
commit
6442155df0
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -14,7 +14,7 @@ A clear and concise description of what the bug is.
|
|||
|
||||
> Provide a mini GitHub repository which can reproduce the issue.
|
||||
|
||||
<!-- https://github.com/YOUR_REPOSITORY_URL -->
|
||||
<!-- YOUR_REPOSITORY_URL -->
|
||||
|
||||
## How To Reproduce
|
||||
|
||||
|
|
|
|||
3
.github/ISSUE_TEMPLATE/bug_report_cn.md
vendored
3
.github/ISSUE_TEMPLATE/bug_report_cn.md
vendored
|
|
@ -19,7 +19,8 @@ assignees: ''
|
|||
## 最小可复现仓库
|
||||
|
||||
为节约大家的时间,无复现步骤的 ISSUE 会被关闭,提供之后再 REOPEN
|
||||
<!-- https://github.com/YOUR_REPOSITORY_URL -->
|
||||
|
||||
<!-- 你的仓库链接 -->
|
||||
|
||||
## 复现步骤,错误日志以及相关配置
|
||||
|
||||
|
|
|
|||
|
|
@ -151,15 +151,16 @@ If it still reports an error, check whether the container DOM is placed on a rou
|
|||
|
||||
## `[import-html-entry]: error occurs while excuting xxx script http://xxx.xxx.xxx/x.js`
|
||||

|
||||
The first line is just an auxiliary information printed by qiankun through console.error, which is used to help users quickly know which js has an error, not a real exception. The real exception information is on the second line.
|
||||
The first line is just a helper info printed by qiankun via `console.error` to help users identify which js file threw the error faster. It is not an exception thrown by qiankun itself.
|
||||
|
||||
For example, such an error indicates that when qiankun was executing the http://localhost:9100/index.bundle.js of the sub application, this js itself threw an exception. The specific exception information is Uncaught TypeError: Cannot read property 'call' of undefined.
|
||||
**The actual exception info is in the second line.**
|
||||
|
||||
Sub-application exceptions can be attempted to be resolved through the following steps:
|
||||
For example in the error above, it means the child app itself threw an exception when executing http://localhost:9100/index.bundle.js. **And the actual exception message is `Uncaught TypeError: Cannot read property 'call' of undefined` in the second line.**
|
||||
|
||||
Check the error js for syntax errors according to the specific exception information, such as missing semicolons, dependence on uninitialized variables, etc.
|
||||
Whether it depends on global variables provided by the main application, but the main application is not actually initialized.
|
||||
Compatibility issues. The js itself of the sub-application has syntax compatibility issues in the current runtime environment.
|
||||
Exceptions from the child app itself can be debugged and fixed with the following steps:
|
||||
1. Based on the specific exception message, check if the js file that errors has syntax errors, like missing semicolons, depending on uninitialized variables etc.
|
||||
2. Whether it depends on global variables provided by the main app, but the main app did not initialize them.
|
||||
3. Compatibility issues. The child app js itself has syntax compatibility issues in the current runtime environment.
|
||||
|
||||
## How to load micro apps on a routing page of the main app
|
||||
|
||||
|
|
|
|||
|
|
@ -152,9 +152,12 @@ qiankun 抛出这个错误是因为微应用加载后容器 DOM 节点不存在
|
|||
|
||||
## `[import-html-entry]: error occurs while excuting xxx script http://xxx.xxx.xxx/x.js`
|
||||

|
||||
其中第一行只是 qiankun 通过 `console.error` 打印出来的一个辅助信息,目的是帮助用户更快的知道是哪个 js 报错了,并不是真的异常。真正的异常信息在第二行。
|
||||
|
||||
比如上图这样一个报错,指的是 qiankun 在执行子应用的 `http://localhost:9100/index.bundle.js` 时,这个 js 本身抛异常了。而具体的异常信息就是 `Uncaught TypeError: Cannot read property 'call' of undefined`.
|
||||
其中第一行只是 qiankun 通过 `console.error` 打印出来的一个辅助信息,目的是帮助用户更快的知道是哪个 js 报错了,并不是 qiankun 本身发生了异常。
|
||||
|
||||
**真正的异常信息在第二行。**
|
||||
|
||||
比如上图这样一个报错,指的是子应用在执行 `http://localhost:9100/index.bundle.js` 时,这个 js 本身抛异常了。**而具体的异常信息就是第二行的 `Uncaught TypeError: Cannot read property 'call' of undefined`。**
|
||||
|
||||
子应用本身的异常,可以尝试通过以下步骤排查解决:
|
||||
1. 根据具体的异常信息,检查报错的 js 是否有语法错误,比如少了分号、依赖了未初始化的变量等。
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user