On developing the SharePoint Framework web part, we may receive the below error message SPFxon loading the web part in the page.
[SPLoaderError.loadComponentError]:
***Failed to load component “2a602d35-fbae-40d3-80f3-4a2afa1e514b” (HelloWorldWebPart).
Original error: ***Failed to load entry point from component “2a602d35-fbae-40d3-80f3-4a2afa1e514b” (HelloWorldWebPart).
Original error: Error loading https://component-id.invalid/2a602d35-fbae-40d3-80f3-4a2afa1e514b_0.0.1
Cannot find module “@ms/sp-telemetry”***INNERERROR:
***Failed to load entry point from component “2a602d35-fbae-40d3-80f3-4a2afa1e514b” (HelloWorldWebPart).
Original error: Error loading https://component-id.invalid/2a602d35-fbae-40d3-80f3-4a2afa1e514b_0.0.1
Cannot find module “@ms/sp-telemetry”
***CALLSTACK:
Error
at SPError (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:10183:9)
at SPLoaderError (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:4211:9)
at ErrorBuilder.buildErrorWithVerboseLog (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:3821:9)
at ErrorBuilder.buildLoadComponentError (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:3743:9)
at Anonymous function (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:7952:9)
Root Cause:
The above issue may raise due to the incorrect reference in the code. For me I have tried to call the webpartcontext code and I have use the below references in the code.
import IWebPartContext from '@microsoft/sp-webpart-base/lib/core/IWebPartContext'; import SPHttpClient from '@microsoft/sp-http/lib/spHttpClient/SPHttpClient';
Solution:
To resolve the issue, I have added the below references by replacing the above code
import { IWebPartContext } from '@microsoft/sp-webpart-base'; import { SPHttpClient } from '@microsoft/sp-http';
July 19, 2018 at 10:24 PM
Thanks Shantha . It resolved my issue.
October 24, 2018 at 11:21 PM
interesting i have same issue however I am not sure where to replace it. I am not a developer and not sure how to use the code from GitHub for content-query-webpart
https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-content-query-webpart
I am getting error after adding it to a page.
[SPLoaderError.loadComponentError]:
***Failed to load component “ac515af1-4490-4c7b-8191-d49b41b26c5e” (ContentQueryWebPart).
Original error: ***Failed to load URL ‘https://localhost:4321/lib/webparts/contentQuery/loc/en-us.js’ for resource ‘contentQueryStrings’ in component ‘ac515af1-4490-4c7b-8191-d49b41b26c5e’ (ContentQueryWebPart). There was a network problem.
Can you please help me?
October 27, 2018 at 9:13 PM
Kindly share which version of SPFx version you are using for developing the webpart.
July 2, 2019 at 10:01 AM
import { IWebPartContext } from ‘@microsoft/sp-webpart-base’;
import { SPHttpClient } from ‘@microsoft/sp-http’;
Where i can add this code??
Please explain?
October 9, 2020 at 12:41 PM
Hello,
We encountered the same problem.
We used the Azure App Proxy with Windows Integrated Authentication.
The issue said “This may be a problem with a HTTPS certificate. Make sure you have the right certificate.”
The https issue used the local url and not the defined msappproxy.net.
Can we add values in DSN certificate? Is there another solution?
Thank you.
April 9, 2021 at 5:14 PM
I have downloaded .sppkg file directly, so where can I open this code and edit those lines.
April 9, 2021 at 6:45 PM
Hey, I do have same issue. Could you please explain me where I need to keep this code which you mentioned in above. Because I downloaded direct .sppkg file and uploaded into apps catalog and then deployed. When I tried to add search web part to page, this error got happened. Please explain me how to open the code of that package and where I need to edit.