I am building SharePoint hosted add-in. I am trying to reference the sp.js and sp.runtime.js but I am getting error

File '_/layouts/15/sp.runtime.js' was not found. SharePointHostedAddin

Screenshot below:

Please help.

enter image description here

  • 1
    Change your path address to /_layouts/sp.js and /_layouts/sp.runtime.js Aug 18, 2020 at 6:17

1 Answer 1


"_" wrong location.It should be:

<script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
<script type="text/javascript" src="/_layouts/15/sp.js"></script>

Document reference:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.