Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [nextjs]

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

Filter by
Sorted by
Tagged with
7 votes
1 answer
2k views

How to configure multisite in Sitecore Next.js application?

How do you implement a multisite setup with Sitecore and Next.js, with a Sitecore First Approach? Do we need to create separate Next.js apps for each site or we can we configure it in the same default ...
ganesh's user avatar
  • 521
7 votes
2 answers
800 views

Extend GraphQL schema for custom field

I'm working on a 10.2 solution with JSS & NextJS using the GraphQL (edge) endpoint. I already noticed this endpoint is sometimes quite different compared to others and now I would like to extend ...
Gatogordo's user avatar
  • 20.1k
6 votes
1 answer
582 views

Current project does not support file deployment into Sitecore instance

I've created a sample nextjs app using jss cli, but when I try to deploy it using: jss deploy app it deploys items successfully, but not files and throws the message below: The current project does ...
Alexander's user avatar
  • 1,273
3 votes
2 answers
476 views

Fields not editable in Sitecore Experience Editor when using GraphQL

I'm using Sitecore 10.2 in my local as headless and nextjs for FrontEnd. I'm able to open the home page on the experience editor and edit fields as well when I use Layout service to fetch data on ...
Erwin Paul's user avatar
3 votes
2 answers
388 views

Multi Language not working in Sitecore headless

We are using Sitecore 10.2 as headless (JSS) and nextjs for the front end. When we try to call JSS API it is working with multiple languages. https://{Sitecore}/sitecore/api/layout/render/jss/?item={...
Mahesh Patil's user avatar
3 votes
3 answers
999 views

Sitecore JSS URL redirecting to not found

Getting the below error when browsing the app URL in connected mode: On browsing https://xyz-app.dev.local it gets redirected to https://xyz-app.dev.local/sitecore/service/notfound.aspx I can see the ...
Anonymous's user avatar
3 votes
4 answers
2k views

NextJs JSS Setup Error generating manifest Error: Unable to load manifest require

Trying to setup NextJs JSS and ran only the below simple commands and it fails with below error for the 4th command but this folder/files doesn't exist. None of the below 4 commands creates those ...
SNew's user avatar
  • 151
3 votes
1 answer
609 views

How to get 404 status code on Rendering host

There is a Sitecore Headless setup with SSG enabled. NextJS allows to show own 404 page but the requirement is to managed the page in CMS. Quick solution was to extend the getStaticProps method in [[.....
Serhii Shushliapin's user avatar
3 votes
1 answer
686 views

SSR Component Level Data fetching in JSS?

In a Headless Sitecore site I'm doing the front-end on, I'm trying to implement search. It's a JSS/Next.js based front end on top of the Sitecore back end. We've got: JSS 20, Next 12.2, Sitecore 10....
Michael Bester's user avatar
3 votes
2 answers
114 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
3 votes
2 answers
171 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
3 votes
1 answer
462 views

Next.js Sitecore layout service consumption in SSR

We are trying to implement a dynamic page behavior that will resolve pages for non item existing routes like: https://mywebsite/stores/store1/ (Stores exists as item but store1 not) The idea was that: ...
aklein's user avatar
  • 211
2 votes
1 answer
64 views

Next.js - multisite + multilingual pages without locale within URL

How do you approach multisite and multingual site configuration without locale within URL? The problem I am facing is that i18n configuration requires to define 'defaultLocale'. I would like to ...
Lukasz123123's user avatar
2 votes
1 answer
80 views

Error: Editing data cache miss for key; Unable to get editing data for preview {"key":"<GUID>"}

After upgrading from JSS 20 to JSS 21, we are unable to open pages in Experience Editor. Our rendering host is Vercel and there are several errors in the logs: Error 1: T', maxHeaderSize: undefined,...
jrap's user avatar
  • 4,951
2 votes
2 answers
167 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
2 votes
1 answer
11k views

Error : TypeError: Class extends value undefined is not a constructor or null

To create a Sitecore JSS app, I ran the PowerShell command below : npx create-sitecore-jss --templates nextjs,nextjs-sxa --appName foodorder --hostName sc103.sc --fetchWith GraphQL However, I ...
Biswajit Nayak's user avatar
2 votes
1 answer
557 views

Missing fonts when previewing Next.js app in Experience Editor

I've got a Next.js-based app that uses custom fonts. On the Rendering host the fonts are accessible via the following url: https://www.myapp.localhost/_next/static/media/lato-latin-400-normal.b7ffde23....
Serhii Shushliapin's user avatar
2 votes
1 answer
606 views

How could we apply Hybrid (SSG and SSR) rendering with Sitecore Nextjs

How could we apply Hybrid (SSG and SSR) rendering in a single Sitecore Nextjs application? We tried this article: https://github.com/Sitecore/jss/tree/release/18.0.0/samples/nextjs/src/pages https://...
Vision's user avatar
  • 21
2 votes
1 answer
604 views

Next Js create app JSS command

I tried both the below commands to create a JSS next js app but none of it has all the required files in the app. npx create-sitecore-jss nextjs npm init sitecore-jss nextjs When I do jss:build, it ...
Shakti Patro's user avatar
2 votes
1 answer
51 views

"Component GraphQL Query" field is ignored in Experience Editor

I installed the Sitecore 10.4 with Headless SXA and I noticed a strange behavior. On the components which has a "Component GraphQL Query" this field is ignored. On a 10.3 solution Link List ...
Vlad Iobagiu's user avatar
  • 18.6k
2 votes
1 answer
338 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
2 votes
1 answer
407 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
2 votes
1 answer
137 views

Unable to login to the sitecore.demo.edge site after installing

https://github.com/Sitecore/Sitecore.Demo.Edge This is a docker demo site from Sitecore using JSS and Next.js Unable to log in to the sitecore.demo.edge site after installing, the value in the .env ...
SNew's user avatar
  • 151
2 votes
1 answer
83 views

Issue with XM Cloud Environment Variables in Next.js

I am facing an issue getting an environment variable value from Sitecore deployment app in my Next JS application. I've set an environment variable XMC_DEFAULT_RH in my XM Cloud instance Deployment ...
Atul Gusain's user avatar
2 votes
1 answer
46 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,632
2 votes
2 answers
587 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
2 votes
1 answer
132 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
2 votes
1 answer
1k views

Headless/SXA/Next.JS : Server error : TypeError: Cannot read properties of undefined (reading 'CustomVariant')

We are using Sitecore-10.3/Headless/SXA/NextJS. When we build a custom new component with few custom variants, we receive errors. We will not receive this when we use the "Default variant". ...
Andi AR's user avatar
  • 763
2 votes
1 answer
582 views

Unable to fetch Image with server url in GraphQL

I am using Sitecore 10.2 in my local as headless and nextjs for frontend. I was trying experience editor, I was able to edit the components in experience editor. Now Images are not showing in Site ...
Mahesh Patil's user avatar
2 votes
1 answer
595 views

How to set layout service within same Next.Js application to access multiple site?

We are configuring multiple site within single Next.js application. In experience editor the multisite work perfectly because its passing sc_site parameter as a query string. But in normal mode only ...
ganesh's user avatar
  • 521
2 votes
0 answers
28 views

How to split JS bundles by page

On our JSS/Next.js site, we are running into an issue issue with poor PageSpeed performance scores, which are mostly attributable to large JS bundles. They're so large because we have one large main....
Marcel Gruber's user avatar
2 votes
0 answers
45 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
2 votes
0 answers
135 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
2 votes
1 answer
208 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
2 votes
1 answer
624 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
2 votes
0 answers
335 views

Mock useSitecoreContext in Nextjs unit tests

I'm trying to write simple unit tests with Jest and mock useSitecoreContext. When I'm mocking the useSitecoreContext like this: useSitecoreContext: jest.fn() I'm getting an error "Cannot ...
Max's user avatar
  • 21
2 votes
1 answer
211 views

Cd url is going to 404

I have downloaded Sitecore Next JS containers setup and installed XP1 in our local instance. But the default CD url is going to 404. The CM Sitecore url including Experience Editor & Preview and ...
Shakti Patro's user avatar
2 votes
1 answer
1k views

NextJS - Cannot destructure property 'datasource' of 'props.fields.data' as it is undefined

Quiet new to NextJS JSS, I'm trying to create a NextJS component which uses integrated GraphQL. But I keep getting this error: import { Text, Link, withDatasourceCheck } from '@sitecore-jss/sitecore-...
Nil Pun's user avatar
  • 2,293
2 votes
1 answer
998 views

How do I create unique Sitecore JSS Dynamic Placeholders?

I have JSS Next.JS based component, I want to have 2 placeholders with the same key, but with a dynamic suffix. e.g. I need 2 equal columns. <div> <Placeholder name='jss-6' rendering={...
Anton's user avatar
  • 3,831
1 vote
2 answers
354 views

unable to use space in field name like "Page Title" in sitecore with nextjs

I'm unable to use space in field name like "Page Title" in sitecore with nextjs. in Layout.tsx it works like below but not working when have sitecore filed like "Page Title": const ...
Erwin Paul's user avatar
1 vote
2 answers
68 views

Source query For General Link Field Type

We need to use a source query for the General Link field type to display only the current page's data. In Sitecore XM Clould, is there any way we can achieve it from the front code (NextJs) as the ...
shrutika shete's user avatar
1 vote
1 answer
428 views

Next.js, Pages Still Generated When Components Error

We have a Next.js implementation on Vercel connected to Experience Edge. We noticed that when components error out, the page that contains the component is still generated. This results in public-...
jrap's user avatar
  • 4,951
1 vote
1 answer
197 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
2 answers
34 views

ERR_HTTP2_PROTOCOL_ERROR while changing the Layout in Sitecore Headless SXA 10.3

We are working on Sitecore 10.3 SXA (Headless with Next.js). While trying to change the layout of a site, we are getting (failed)net::ERR_HTTP2_PROTOCOL_ERROR while accessing the Layout Service. Are ...
Hari Prasad Kotha's user avatar
1 vote
1 answer
95 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
1 vote
1 answer
824 views

How do you enable `/sitecore/api/graph/items/master` endpoint in sitecore jss nextjs

I have edge graphql endpoint enabled but I noticed that it doesn't do mutations, I'm trying to figure out how to enable the built in systemContent schema for my mutation requests. Edit I think it's ...
Carl Nierves's user avatar
1 vote
1 answer
699 views

Allow CORS request from CM to Rendering host

Related to Missing fonts when previewing Next.js app in Experience Editor. I've got the Rendering container with SITECORE_API_HOST set to CD. In CM Experience Editor I see some CORS errors caused by ...
Serhii Shushliapin's user avatar
1 vote
2 answers
566 views

Is it possible to use an existing React.js application with Sitecore Headless?

I have an existing React.js application and I want to integrate it with Sitecore to provide CMS features. Is it possible to integrate the existing React.js App with Sitecore 10.2 with Headless support?...
Vaibhav Warhadpande's user avatar
1 vote
1 answer
840 views

The remote name could not be resolved "rendering" error in experience editor

I am using Sitecore 10.2 and did the local setup by following the below link-- https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/walkthrough--setting-up-a-development-...
Shakti Patro's user avatar
1 vote
1 answer
461 views

Sitecore JSS next.js Link component renders unnecessary field attribute

If you are using next.js v19.0.2 and using the "Link" component with "field" the following markup is generated. <a field="[object Object]"> ... </a> This is ...
aklein's user avatar
  • 211