7

I am preparing am XM Cloud project for local development with Node.js. On completion of the setup I am getting the below error:

error - FetchError: request to https://edge.sitecorecloud.io/api/graphql/v1 failed, reason: connect ETIMEDOUT 2606:4700:91b3:c4eb:e83b:421:f8c7:3c32:443
    at ClientRequest.<anonymous> (E:\Projects\HeadlessDemo\XMCloudDemo\src\sxastarter\node_modules\next\dist\compiled\node-fetch\index.js:1:65756)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:502:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT',
  page: '/en/_site_XMCloudDemo'
}

I can fetch data from GraphQL API using parameter:

https://edge.sitecorecloud.io/api/graphql/ide

I follow the below URL to setup my local environment:

https://doc.sitecore.com/xmc/en/developers/xm-cloud/walkthrough--connecting-the-next-js-application-directly-to-the-experience-edge-endpoint.html

Please help me to fix this error.

2 Answers 2

4

I got help from Sitecore Slack Headless group and as suggested I run npm ci command on the Front-end app root directory. That resolved my initial problem. Initially I did npm install instead of npm ci.

Then I encountered bellow error- enter image description here

As I am doing local setup and I don't need CDP, so I just disabled CDP from CdpPageView in the src\Scripts.tsx file as suggested in different blogs and YouTube videos.

0

Likely this happens because the port 443 is blocked. Please check and ensure that the port is enabled.

If IIS is running by default then simply stop it by executing iisreset /stop in cmd to release the required ports for the web apps and Solr.

1
  • 1
    Thanks, Kate, for the suggestion, but 443 is enabled. I got a solution of the problem and posted that. Commented Jun 29, 2023 at 5:01

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.