Skip to content

Commit

Permalink
[main] [doc] add requireJs problem in SdkLoadFailure.md (#2229)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuniu-ms committed Dec 30, 2023
1 parent 5e356df commit ef0dd4e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/SdkLoadFailure.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,16 @@ Quick check: Using a browser that supports Developer tools (F12), validate on th
## <a name="next"></a> Next steps
* [Get additional help by filing an issue on GitHub](https://github.com/Microsoft/ApplicationInsights-JS/issues)
* [Back to Snippet setup](https://github.com/microsoft/ApplicationInsights-JS/blob/main/README.md#reporting-script-load-failures)

## Sdk Initialization Failure Due to RequireJs

If you're experiencing issues with Application Insights not loading properly, it might be because there's a conflict with RequireJs. This usually happens when RequireJs has already been loaded by the time Application Insights tries to initialize. Refer to the documentation [here](https://github.com/microsoft/ApplicationInsights-JS/blob/main/README.md#module-formats) for more detailed information.


### Troubleshooting
- Check if another script is calling require js
- Check if RequireJS is loaded first before script is loaded

### Recommended Workaround Solution
- Instead of using 3.x.x.min.js or 2.x.x.js, opt for 3.x.x.gbl.min.js or 2.x.x.glb.js.
- Load application insight script prior to other scripts

0 comments on commit ef0dd4e

Please sign in to comment.