0

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
  • 1
    Change your path address to /_layouts/sp.js and /_layouts/sp.runtime.js Aug 18, 2020 at 6:17

1 Answer 1

0

"_" 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:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-the-sharepoint-javascript-apis-to-work-with-sharepoint-data

Your Answer

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

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