I have created a sample App for SharePoint 2013 and deployed it successfully. When launching the app, I am getting the following error for every line of code calling RegisterSod
Message: 'RegisterSod' is undefined
Line: 14
Char: 1
Code: 0
<script type="text/javascript">RegisterSod("initstrings.js", "\u002f_layouts\u002f15\u002f1033\u002finitstrings.js?rev=uNmvBiHdrBzcPQzXRpm\u00252FnQ\u00253D\u00253D");</script>
<script type="text/javascript">RegisterSod("strings.js", "\u002f_layouts\u002f15\u002f1033\u002fstrings.js?rev=cSu1pcWiRc999fyCNzJplg\u00253D\u00253D");RegisterSodDep("strings.js", "initstrings.js");</script>
Is there anyway this issue can be resolved?
I know that it's old but I hope this will help somebody else having the problem:
This issue is most likely caused by not having a root site in the SharePoint Server.
Create a root site collection by going to the Central Administration –>Create Site Collection and when selecting the Web Site Address make sure you use ‘/’ as the site address which means that this will be the root site.
I did a blog post on this error here
Hope that helps!