Questions tagged [nextjs]

Questions related to Next.js in Sitecore context should be considered into this tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
42 views

The remote server returned an error: (500) Internal Server Error [closed]

I have XM Cloud running locally in a docker container. When I tried to access my local Sitecore instance in the Pages editor with Sitecore XM Cloud Extension in Chrome failed with the following error. ...
Supun Jayarathne's user avatar
0 votes
1 answer
52 views

How to handle client or server side errors that occurred in placeholder renderings

I am new to both Sitecore and next.js 13.5+ I created a scaffolded nextjs jsssitecore application using npx create-sitecore-jss nextjs I am trying to create centralized error boundary. When there are ...
SSC's user avatar
  • 1
1 vote
0 answers
34 views

Deploying next js to production (on VM)

Is there any guidelines from Sitecore that shows how I can deploy my next app to a VM. The documentation website is talking about Vercel mainly, but what if I want to deploy it to a windows VM, assume ...
Jose's user avatar
  • 63
2 votes
1 answer
37 views

What's the best way to register components into the component builder from other directories?

I'm working on a monorepo solution which would have a set of Shared components one level above the site folder. I'm looking at updating scripts\generate-component-builder\plugins\components.ts per the ...
Mark Gibbons's user avatar
  • 5,522
0 votes
0 answers
38 views

Unable to access subpages in multisite NextJS+XM Cloud

So I have 2 sites under 1 project. My project was created by using https://github.com/sitecorelabs/xmcloud-foundation-head which already had multisite plugin installed and I'm able to setup the ...
rayray's user avatar
  • 71
0 votes
1 answer
70 views

How to setup Multisite in NextJS for XM Cloud [duplicate]

my XM Cloud project was setup by following https://github.com/sitecorelabs/xmcloud-foundation-head. So by default all the multisite plugin has been setup. I'm able to see the list of available sites ...
rayray's user avatar
  • 71
1 vote
1 answer
55 views

Deploying a JSS App Next JS to Scaled Sitecore environment (Production)

Hello Everybody I am working on a Next Js App over Sitecore it is working fine locally the app is created and working on Localhost but now I need deploy the App to production I have a Sitecore 10.3 ...
Andrew Hany's user avatar
2 votes
0 answers
23 views

How to figure out which rendering is causing "Error serializing .componentProps[] returned from getStaticProps, undefined cannot be serialized as JSON

I've got a prerendering error that's breaking my builds, and I can't figure out how to track down where in the code the issue is because the error message is so generic when this happens: Error: ...
Erica Stockwell-Alpert's user avatar
3 votes
2 answers
78 views

deploying next.js JSS app to sitecore

I have installed sitecore 10.0.3 on premise on dev server (remote desktop) and created next.js Jss app and connected the app with sitecore, now i have the app running and i can access the site from ...
shimaa elsayed's user avatar
1 vote
1 answer
72 views

Redirect middleware not working

I wanted to try out the redirects module from SXA though something is quite not right. I created the redirect maps on the Site and republished the Site item as I’ve read in an existing question here ...
Lala's user avatar
  • 397
1 vote
0 answers
158 views

Next.js Multisite Add-on not working in local containers because of CORS issues

Wondering, has anyone at all managed to make Next.js Multisite add-on work well? I spent lots of time trying to overcome a CORS issue, which I don't know how to solve. There is a troubleshooting guide,...
Martin Miles's user avatar
2 votes
0 answers
87 views

Modify the domain name for media items in XM Cloud

On our XM Cloud site built using Nextjs the URL for media items is structured as follows: https://edge.sitecorecloud.io/prod/media/project/videos/video1 and it currently works correctly. However, my ...
Aditya Gautam's user avatar
1 vote
1 answer
157 views

How to Handle 500 error Page in Sitecore Headless

I have created a custom 500.tsx page under the pages folder. But still, I am unable to get my 500 page working, instead, it shows the default error message. I have tried deleting my custom 500 pages ...
Manoj's user avatar
  • 171
1 vote
2 answers
102 views

RSS Feeds in NextJS Application

We've got a Sitecore headless project using NextJS. I've setup an rss feed using the OOTB Sitecore RSS functionality and it seems to be generating the correct xml when I view it through EE or preview. ...
Paul Schofield's user avatar
1 vote
0 answers
77 views

Rendering container fails to start: system cannot find the file specified

I am adding a rendering service/container to my solution. I see this error from the rendering container when running docker compose up: Error response from daemon: container ...
Marcel Gruber's user avatar
0 votes
1 answer
115 views

NextJs - template issue

I am trying to setup Sitecore Containers template for Next.js using this guide from the official docs. Everything works fine, no errors under installation or deployment jss app to Sitecore. On my home ...
Daniel's user avatar
  • 3
0 votes
0 answers
39 views

hostname could not be parsed error when hitting custom MapHttpRoute

I am running Sitecore (10.2)/SXA backend in Docker. I am running NextJS directly on my host machine via npm run start:connected. On upstream environments, when I hit /export/doc?id=xxxxxxx, a file is ...
Marcel Gruber's user avatar
0 votes
1 answer
132 views

POSTing to localhost:3000/api/editing/render results in error "Unable to extract editing data from request"

I am doing some troubleshooting with my Sitecore(10.2.1)/NextJS(12.3.1)/JSS(20.0.3)/Docker setup. I am running my backend in Docker and my front end via npm on my host machine. I am POSTing to http://...
Marcel Gruber's user avatar
2 votes
2 answers
104 views

XMCloud Vercel app Redirect URL from uppercase to lowercase

We have an XMCloud application using NextJs, which we are deploying to Vercel. On the Vercel side, it is working fine. We have a requirement where if someone is adding uppercase/Camelcase in the URLs ...
Mahendra Shekhawat's user avatar
0 votes
1 answer
72 views

how to setup docker in local machine after setup sxa headless application

I have Sitecore SXA Headless with a Next.js application running on my local machine. Now, I want to set up Docker for this application. Could you please provide steps for this? Sitecore version: ...
PKH's user avatar
  • 465
0 votes
0 answers
39 views

Headless (NextJS) Component not working when added to Sitecore XM cloud Page Designs [duplicate]

We are facing issue with the few our Headless component created in NextJS for Sitecore XM cloud implementation where nested component is created which ultimately render some code like below. ...
Nikhil Kulkarni's user avatar
2 votes
1 answer
174 views

Next.js multisite plugin context is not returning rewrite path

I am using next.js multisite plugin https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-headless-development/the-next-js-multisite-add-on.html I have configured 2 sites in env.sites, cft and ...
Bala Grorrepati's user avatar
0 votes
0 answers
243 views

Vercel Middleware does not run on home page when using config/matcher

I've got a multilingual JSS / Next.JS site. I am integrating Vercel Middleware and looking to exclude certain paths from the middleware without invoking middleware in the process of checking. As a ...
Marcel Gruber's user avatar
1 vote
1 answer
173 views

graphql-let codegen giving JavaScript heap out of memory exception

We are working on Sitecore 10.3 with Next.js on Docker. In one of our components, we are trying to get the data from Sitecore. We added a graphql query by creating a file called NavigationIntegrated....
Sumit Bhatia's user avatar
  • 4,930
2 votes
1 answer
280 views

Self-hosting nextjs [closed]

I couldn't find any information online how this can be done with sitecore. All documentation talk about hosting it on third-party providers such as Vercel or Netfliy. But it says next js can be hosted ...
Jose's user avatar
  • 63
1 vote
0 answers
74 views

Separate Editing host for Sitecore Headless application in local docker setup

I am trying to create the separate Editing Host (Next.js) for container setup. Sitecore version: 10.3 without SXA Sitecore JSS Next.js SDK version: 21.2.4 without SXA Multi-site add-on For this I ...
Amit Kumar's user avatar
0 votes
0 answers
37 views

Chunks/Page<>.js not loading in a Sitecore 10.2 SSG + NextJS after NextJs upgrade

I am looking for some guidance around upgrading NextJs and ReactJs on the with Sitecore 10.2. Please find below the details for the implemetation: Sitecore 10.2 with "Sitecore Headless ver 20.0....
Debasis Mishra's user avatar
0 votes
0 answers
69 views

Sitecore 10.3 JSS 21.0.1 Next.js - Unable to register fields for nested props in manifest definition

I am new to the Sitecore. I have created the Next.js application in disconnected mode. I am trying to register below props in component definition file. fields: { NewsCards: { PreviewImage: ...
pvn sreedhar's user avatar
1 vote
1 answer
153 views

JSS deploy config to XM Cloud failed

I'm using Sitecore XM Cloud environment, and I setting up my next.js app to connect to Sitecore editors. I'm currently following this article. After setting up the configuration file and run jss ...
WenHao's user avatar
  • 213
1 vote
1 answer
367 views

Getting error "Ensure that there is only one instance of "graphql" in the node_modules directory"

I am trying to create a Sitecore JSS app for Sitecore 10.3 with nextjs template. I keep getting the error below when I try Jss start command. I am trying to run this in disconnected mode with REST. My ...
Padmaja's user avatar
  • 11
1 vote
1 answer
146 views

Sitecore Forms with NextJs and Hybrid SSG + SSR rendering

I am new to Sitecore JSS and am trying to the implement Sitecore Forms using the hybrid rendering approach [SSR+SSG] in a Sitecore 10.2 with NextJs app. Some selected paths would be SSR rendered and ...
Debasis Mishra's user avatar
0 votes
1 answer
92 views

Excessive next builds and deploys (triggered by publish webhooks) for SSG

The Sitecore docs on deploying JSS Next.JS sites to Vercel state that you must trigger a next build and site deployment via webhook on publish in order to pre-render the site with static site ...
Marcel Gruber's user avatar
0 votes
1 answer
159 views

Sitecore XMC NextJS Wildcard Pages

Sitecore NextJS, XM Cloud I need to query an API and get a list of Authors. Let's assume there are 1000 authors. In Sitecore, I created a folder called Authors and an item of template AuthorDetails ...
Anthony Fernandes's user avatar
0 votes
2 answers
283 views

Sitemap.XML for Sitecore JSS NextJS using SXA

We are working on 10.2 Sitecore JSS (NextJS) using SXA. We have enabled Sitemap.xml in Sitecore using OOTB SXA settings. We can see sitemap item at this path /sitecore/content/TenantName/Home/Settings/...
Raman Gupta's user avatar
  • 2,444
0 votes
0 answers
139 views

How to dynamically import a component in sitecore jss inside next js application?

I know the conventional way of dynamically importing a component : const Report = dynamic(() => import('PowerBIComponent'), { ssr: false, }); But since application uses [...path] to catch ...
Nishant's user avatar
0 votes
0 answers
157 views

Server Error TypeError: Cannot read properties of null (reading 'key') i18n/graphql-dictionary-service.js

I am running Sitecore 10 locally with Next.js The site works fine in Experience Editor but in normal mode i.e. http://localhost:3000/ I started getting this error below. Tried everything but in vain, ...
Zaheer Tariq's user avatar
2 votes
1 answer
401 views

Rendering host container returns 500

Whenever I try to access my local Sitecore instance in the Pages editor, it shows an error: Connection to rendering host http://rendering:3000/api/editing/render failed with the following error: The ...
Lala2022's user avatar
1 vote
1 answer
55 views

Error Rendering Sitecore.JavaScriptServices.ViewEngine.Presentation.JsLayoutRenderer: An item with the same key has already been added

I am using Sitecore 10.2. I am able to run my sample nextjs application in connected mode using the command in VS Code terminal jss start:connected. But I am not able to open my application in local ...
user13283's user avatar
0 votes
0 answers
15 views

Not able to create manifest file .PFA in sitecore jss with next.js [duplicate]

I am trying to integrate sitecore-jss with next.js, when I am trying to run the below command 'jss deploy app --accept certificate 426a2098ef89941dec9f277a4bc1ef677f555a4a -c -d' getting not able to ...
Reshma Holennavar's user avatar
1 vote
0 answers
206 views

XMCloud + NextJS 13 AppRouter implementation

We are implementing a headless solution with XMCloud and NextJS. We noticed that sitecore lab sxa-starter already had an example for next 13, but it does not implement AppRouter yet (App Router | Next....
depressed_cubic's user avatar
1 vote
1 answer
71 views

Local CM site Experience Editor fetches NextJS static assets from Vercel instead of local

I have a local install of NextJS & SC 10.2. The site is running via docker with a setup that is mostly similar to this example: https://github.com/Sitecore/docker-examples/blob/develop/getting-...
Marcel Gruber's user avatar
0 votes
0 answers
30 views

Unable to access 'FileProperties' JSON of document uploaded to Content Hub DAM to retrieve file extension

Running Sitecore.NET 10.3.0 - November 01, 2022 .NET Framework 4.8 I'm trying to figure out how to retrieve the FileProperties (JSON values) that contains metadata information regarding files uploaded ...
Noel's user avatar
  • 1
0 votes
1 answer
181 views

XM Cloud External Editing Host Configuration

Problem Statement I'm attempting to configure an external editing host using Sitecore's documentation for XM Cloud. My editing host is in Vercel. Headless SXA seems to have moved JSS App configuration ...
Chet Cheeto's user avatar
0 votes
1 answer
229 views

Setting up 500 error page in XM Cloud Sitecore instance with static html pages

I am trying to have setup 500 error page in XM Cloud Sitecore instance. I have configured "Server error page link" in setting item but do not see "Error Handling" tab to generate ...
Akash S's user avatar
  • 440
1 vote
0 answers
63 views

Headless SXA - Ensuring links are localized

We're developing a Language Switcher for our SXA NextJS app, I followed the documentation from NextJS on how to perform the switch and it works (switching from language A to language B) but what I ...
chrono.lala's user avatar
2 votes
1 answer
299 views

Issue on Submit Action for Sitecore Forms in NextJS app

I'm trying to implement Sitecore Forms with the NextJS app using this official document https://doc.sitecore.com/xp/en/developers/hd/211/sitecore-headless-development/implement-a-sitecore-form-in-a-...
Ashish Chavan's user avatar
1 vote
1 answer
841 views

A rendering error occurred: Cannot read properties of undefined (reading 'attributes')

I have Setup the JSS application with Sitecore 10.3. When I am adding the components on page level its working fine but when I added them on partial design they are appearing fine there in experience ...
Vishal Khera's user avatar
2 votes
2 answers
464 views

ClientError: GraphQL.ExecutionError: Error trying to resolve rendered

Error while jss start:connected in sitecore jss next js sample app
Jagmeet Kaur's user avatar
0 votes
1 answer
193 views

Sitecore JSS nextjs | The requested document was not found [closed]

Sitecore jss nextjs sample app in connected mode. installation is done as per https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/walkthrough--creating-a-jss-next-js-...
Jagmeet Kaur's user avatar
2 votes
1 answer
116 views

Prevent Sitecore from creating the sitename#lang cookie in jss/nextjs app

Is there a way to block Sitecore from creating the {website}#lang cookie? When Sitecore's Layout Service is used with a headless app (a next js app)? Will it be enough to add a processor in ...
Sebastian Tecsi's user avatar