Mikhail2k15 / viva-connections-company-communicator

Adaptive Card Extensions for Viva Connections Dashboard shows the latest org-wide communications from Company Communicator to prioritize their visibility and increase readership across your organization.
1 stars 2 forks source link

Failed to load entry point. _extends is not defined #10

Open qmatteoq opened 2 years ago

qmatteoq commented 2 years ago

Hello, first thanks for your work! I'm trying to deploy your extension in my test tenant, where I've deployed also Company Communicator. The card works, I can see the latest messages sent to the global org. However, randomly, the card fails to load on the SharePoint page with the following stack:

[SPLoaderError.loadComponentError]:
Failed to load component "3e438448-c7d6-4ba0-beee-49804041f2af" (CompanyCommunicatorAdaptiveCardExtension). Original error: Failed to load entry point from component "3e438448-c7d6-4ba0-beee-49804041f2af" (CompanyCommunicatorAdaptiveCardExtension). Original error: Error loading https://component-id.invalid/3e438448-c7d6-4ba0-beee-49804041f2af_1.0.1
    __extends is not defined

INNERERROR:
Failed to load entry point from component "3e438448-c7d6-4ba0-beee-49804041f2af" (CompanyCommunicatorAdaptiveCardExtension). Original error: Error loading https://component-id.invalid/3e438448-c7d6-4ba0-beee-49804041f2af_1.0.1
    __extends is not defined
CALLSTACK:
Error
    at t [as constructor] (https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_e149dc38213e056cff23d3bacce78572.js:70:215357)
    at new t (https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_e149dc38213e056cff23d3bacce78572.js:70:788000)
    at e.buildErrorWithVerboseLog (https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_e149dc38213e056cff23d3bacce78572.js:70:825284)
    at e.buildLoadComponentError (https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_e149dc38213e056cff23d3bacce78572.js:70:821375)
    at https://res-1.cdn.office.net/files/sp-client/chunk.systemjs-component-loader_en-us_775bc871f8375996a140.js:1:6036

I get the same error either in debugging or if I upload and deploy the generated .sppkg file. Do you have any idea what might be causing the issue?

Thanks!

qmatteoq commented 2 years ago

I found a similar error reported in the Application Insights library for JS / React and, indeed, by removing it, it seems I was able to get rid of the error. However, I haven't fully investigated yet which is the right way to fix it. Here is the issue: https://github.com/microsoft/ApplicationInsights-JS/issues/1281

Mikhail2k15 commented 2 years ago

@qmatteoq try to use these versions "@microsoft/applicationinsights-react-js": "^3.0.5", "@microsoft/applicationinsights-web": "^2.5.8",

jeffand33 commented 2 years ago

Hello Michael - thank you for your excellent work! I'm facing the same issue as described above but not clear about how to fix, could you elaborate?

Mikhail2k15 commented 2 years ago

@jeffand33 @qmatteoq try to use the latest version now.

jpalo commented 2 years ago

Occuring also with:

"@microsoft/applicationinsights-react-js": "^3.0.5",
"@microsoft/applicationinsights-web": "^2.5.10",

Cannot use more recent versions due to being stuck on React v16 due to SPFx.