diff --git a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/dictionary-service-factory.ts b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/dictionary-service-factory.ts index 5079b06129..9aa53dede7 100644 --- a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/dictionary-service-factory.ts +++ b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/dictionary-service-factory.ts @@ -37,9 +37,8 @@ export class DictionaryServiceFactory { By default it uses the `DefaultRetryStrategy` with exponential back-off factor of 2 and handles error codes 429, 502, 503, 504, 520, 521, 522, 523, 524, 'ECONNRESET', 'ETIMEDOUT' and 'EPROTO' . You can use this class or your own implementation of `RetryStrategy`. */ - retries: - process.env.GRAPH_QL_SERVICE_RETRIES && - parseInt(process.env.GRAPH_QL_SERVICE_RETRIES, 10), + retries: (process.env.GRAPH_QL_SERVICE_RETRIES && + parseInt(process.env.GRAPH_QL_SERVICE_RETRIES, 10)) as number, }) : new RestDictionaryService({ apiHost: config.sitecoreApiHost, diff --git a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/layout-service-factory.ts b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/layout-service-factory.ts index 464eb2b3ee..84e92f8dc0 100644 --- a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/layout-service-factory.ts +++ b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/layout-service-factory.ts @@ -30,9 +30,8 @@ export class LayoutServiceFactory { By default it uses the `DefaultRetryStrategy` with exponential back-off factor of 2 and handles error codes 429, 502, 503, 504, 520, 521, 522, 523, 524, 'ECONNRESET', 'ETIMEDOUT' and 'EPROTO' . You can use this class or your own implementation of `RetryStrategy`. */ - retries: - process.env.GRAPH_QL_SERVICE_RETRIES && - parseInt(process.env.GRAPH_QL_SERVICE_RETRIES, 10), + retries: (process.env.GRAPH_QL_SERVICE_RETRIES && + parseInt(process.env.GRAPH_QL_SERVICE_RETRIES, 10)) as number, }) : new RestLayoutService({ apiHost: config.sitecoreApiHost,