I am loading a JS file in a LWC with:

import { loadScript } from "lightning/platformResourceLoader";

connectedCallback() {
    loadScript(this, "/resource/simpleTest")
      .then(() => {
        console.log("file loaded");
      .catch(e => {
        console.log("error: ", e);

On Community I get: "Failed to load resource: the server responded with a status of 503 (Service Unavailable)" and when I click on the url on the right I arrive on a page saying that "https://my-domain.cs189.force.com/digital is closed for maintenance...". When testing outside Community it is working fine.

1 Answer 1


As mentioned here, I don't think lightning/platformResourceLoader is supported for communities yet (or at the least not fully supported).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .