Questions tagged [jss]

For questions about the Sitecore JavaScriptServices module and JSS CLI.

149 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
505 views

Sitecore JSS integrated mode performance tuning

I hope you all are doing well and safe. Today I am here to ask a question specific to Sitecore JSS performance. Category - Sitecore JSS integrated mode, performance issue Sitecore Version - 9.2, ...
5 votes
1 answer
150 views

Sitecore JSS Federated Authentication in Production Environment (Headless mode)

We are building a DXP solution for our customers that requires Federated Authentication (via Azure AD). The solution is built on top of Sitecore JSS using Angular. The documentation related to ...
4 votes
0 answers
94 views

Sitecore 10.1 jss 16 cannot correctly identify renderings in integrated mode

I have created jss project with react template, and I have added typescript support by installing some typescript libraries and adding to server.webpack.config.js next config: module: { rules: [ { ...
2 votes
0 answers
41 views

Extending or customizing XM Cloud - Sitecore Pages to support droplink editing

Is there a way to extend or customize Sitecore Pages to allow editing droplink or droptree in the side panel for XM cloud, similar to how we can edit the currently supported fields here https://doc....
  • 23
2 votes
1 answer
81 views

Is there a way to set fields on the Sitecore Headless / JSS Settings for the site via environment variables?

Prior to SXA-JSS you could define the JSS Site settings in the config and therefore be able to use environment variables for things like the serverSideRenderingEngineEndpointUrl. Is there a mechanism ...
  • 5,245
2 votes
0 answers
94 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 ...
  • 21
2 votes
1 answer
88 views

I can't access images from my containerized jss app but I can access them from outside, from my host (10.2 - with docker)

I'm rewriting the problem, to put more details. I set up a jss app in a docker container. It's working fine, even the Experience Editor has already been put to work in this environment. It turns out ...
2 votes
0 answers
202 views

Sitecore JSS not working with Pinia/Vuex

I am having issues trying to integrated Pinia@2.0.14 with Sitecore JSS App built from version 15.0.2. The sample app uses "vue": "~2.6.10". When I am running the app locally in ...
2 votes
0 answers
254 views

Sitecore 10 JSS docker setup

I am new to Sitecore JSS but have been doing development using Sitecore for 5 years. I am trying to set up JSS on my docker image. I have been successfully able to update the docker file for CM & ...
2 votes
0 answers
119 views

"jss-main" was not found in the current rendering data while using node-headless-ssr-proxy with React

I am developing the JSS react template with node-headless-ssr-proxy for my company's solution, the react application have been migrated with Redux and dynamic routes, it can run and work normally in ...
2 votes
0 answers
30 views

How to make a component support a datasource item as well as being on a partial design [VueJS]

I'd like to make a component reusable whether it is a standard component with a datasource item specified, or on a partial design with no datasource and so it should fall back to using the routeData ...
  • 5,245
2 votes
0 answers
85 views

Sitecore Virtual login and accessing userProfile.context during layout service execution

we are working on custom personlization rules with user data available outside sitecore. App is developed in jss in ssr mode. With sitecore login setting up virtual user context when user logged in to ...
2 votes
0 answers
58 views

Rendering not getting picked from cache

Sitecore 9.3 - JSS I was working on the performance aspects of my application. And I checked the details on Stats.aspx The different JsonDatRenderer are for different Websites hosted on the instance. ...
  • 1,248
2 votes
0 answers
67 views

Is there a change in GraphQL Schema between JSS version 11 and 14?

I am currently using sitecore 9.0.2 and have installed JSS to query the data using graphQL queries. I use below features of JSS: Querying data using http://sitecore.local/sitecore/api/graph/items/...
2 votes
0 answers
205 views

Personalization on Layout Service not working when calling from JSS App

My Sitecore CD website in IIS is http://cd.my-website.com with a role as ContentDelivery. This site contains Sitecore and custom API code in Headless mode. The React code for the JSS app is on a ...
2 votes
0 answers
231 views

A rendering error occurred: Cannot read property 'fields' of undefined

Trying to add RouteType item (as provided in samples on creating a new JSS app). Once I add in experience editor, it appears fine like below But as soon as I click save, I got below error message. ...
  • 19
2 votes
0 answers
86 views

Running jss cli commands from c# class

Im trying to run jss cli commands (Windows Powershell) from my C# Class. I`m creating the commands dynamically, but i noticed that jss commands are not running. PowerShell ps = PowerShell....
2 votes
0 answers
59 views

How to set a Datasource explicitly in yml file and change it when I go for personalization?

I'm using Jss react. I want to pass a datasource to a component which is coming from a different location (not from component itself or sitecore context). I want to use personalization so the ...
  • 97
2 votes
0 answers
43 views

Can I create a native android app by retrieving data from Sitecore?

Current situation I have Sitecore 9.3. My Sitecore runs locally inside a vm. I've created a jss website and deployed it to sitecore following the official guide. What i want I want to create an ...
2 votes
0 answers
180 views

Not able to edit text inline in button tags

I am using Sitecore 9.3 with JSS. I have created few components that have buttons. The button labels are editable in sitecore. The issue is when I edit those button labels inline, e.g, I need to add ...
2 votes
0 answers
77 views

React owl.carousel $ not defined in preview but working in edit mode

I'm having an error right now with owl-carousel. I have it imported in some of my components in react jss and it is throwing error when I'm on Preview in Experience Editor but working perfectly when ...
  • 73
2 votes
0 answers
185 views

Create new content missing when adding a component in experience editor

I'm using Sitecore 9.3 with JSS 13. When I try to use the add here and select one of my components I get the Select the associated Content dialog box. This box is missing the create new content ...
  • 439
2 votes
0 answers
754 views

jss build does not change hash on files when outputHashing is set to all

We are now going to production and are noticing the jss build and jss deploy files are not updating the hash on the file names when the content changes. This is causing cache busting to not work and ...
2 votes
0 answers
311 views

How do I get my SSR proxy to site resolve the LayoutService for my JSS/SXA Site?

We're on Sitecore 9.2, SXA 1.9, JSS 12. previously On 9.1, we had the following setup: JSS App sitting in /sitecore/content/myapp A site definition that mapped a hostName to our /myapp A JSS ...
  • 24.7k
2 votes
0 answers
81 views

Error when personalizing JSS renderings

I'm getting the following error when I try to personalize a JSS component that was deployed into a JSS tenant on 9.2: > Cannot read property 'image' of undefined TypeError: Cannot read property '...
2 votes
1 answer
344 views

Tracking Page Events and Goals Does`t Work Correctly

I am working on a mobile application (Sitecore 9.1, JSS React Native) with a couple of pages. A page event is assigned to each of the mobile application pages. I have enabled indexing anonymous ...
2 votes
1 answer
609 views

Unexpected response from import service: Invalid Authentication

I'm trying to perform the command to deploy my application to a remote CM server jss deploy app --includeContent --includeDictionary but I receive the following error Sending package sitecore\package\...
1 vote
1 answer
34 views

Unable to use JSS Site name

Background: I created a lot of JSS sites while I was learning Sitecore JSS with React integration. Also, I erased them. Currently, if I attempt to create a new JSS site, the CMS indicates that "A ...
1 vote
0 answers
39 views

How to render link / text field as seamless button in Experience Editor

Imagine we have a link field ctaLink and a text field ctaText which are rendered as follows: <div className={styles['cta']}> <Link field={fields?.ctaLink as LinkField} className={styles['...
1 vote
0 answers
35 views

Sitecore DropTree field render in JSS layout service API

I am using DropTree field and I selected the listing page Item. so now I want to see the selected item full path in the layout service API. Actually Layout Data "componentName": "...
1 vote
0 answers
305 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 ...
1 vote
1 answer
156 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 ...
1 vote
0 answers
141 views

Get URL for route item from Content List field

I have a field with a ContentList / Treelist of pages, each one of which I want the URL for. Using JSS with Next.js. If I inspect the field in the browser I can see the URL listed for each item as ...
1 vote
1 answer
63 views

JSS app not finding the layout after Headless Tenant creation when I deserialize items first

I'm using JSS Next with XM running into Docker and I'm getting a layout not found error, but I don't know where I can validate this. My scenario is the following, I've some serialized items and I know ...
1 vote
1 answer
116 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 ...
1 vote
1 answer
277 views

GraphQL Component Query does not effect Layout Service response

Environment: Sitecore 10.2 XM Headless 20 SXA 10.2 SPE 6.3 Problem When I fill in the Component GraphQL Query field for a Json Rendering with something simple like this: query IntegrationQuery($...
1 vote
0 answers
97 views

How to replace custom token that is in RichText field using Sitecore JSS?

I have a custom token %tokenname% in single line text and richtext fields. I would like to replace the token with some custom value in the Sitecore JSON rendering. Please see some example data below: {...
1 vote
1 answer
100 views

How to disable Mutation and Subscription in Sitecore GraphQL?

As per sitecore documentation, it states You can use custom authorization routines. Content endpoints can disable specific operations, so, for example, a mutation-free read-only content endpoint is ...
1 vote
0 answers
155 views

JSS NextJS GraphQL.d.ts code gen best practice

Sitecore NextJS sample generates the *.d.ts file. The size of this file is pretty big. It uses graphql-let behind the scene. https://github.com/Sitecore/jss/tree/release/19.0.0/samples/nextjs/src Keen ...
  • 2,253
1 vote
1 answer
28 views

Can I use ES Modules to build JSS applications

There are two module systems used for modern JS applications - old CommonJS and ES Modules (https://nodejs.org/api/packages.html#determining-module-system). And there are different modern packaging ...
  • 868
1 vote
1 answer
679 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-...
  • 2,253
1 vote
0 answers
61 views

Integrate external live chat to Sitecore JSS

I am trying to integrate live chat in Sitecore JSS App. I am using Vue for coding. I need add some external Javascript for webchat to work and I want to configure the url's in Sitecore. My question is ...
1 vote
0 answers
86 views

NextJS JSS on container missing Sitecore items

I'm following this walk through to setup NextJS JSS on container https://doc.sitecore.com/xp/en/developers/hd/190/sitecore-headless-development/walkthrough--setting-up-a-development-environment-with-...
  • 2,253
1 vote
1 answer
201 views

Headless Dictionary Service not working

I am using Sitecore Headless Services Server XM 18.0.0, and the Layout Service(like: /sitecore/api/layout/render/jss?item=) is working just fine. But when I tried to use the Dictionary Service I got ...
  • 11
1 vote
1 answer
548 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={...
  • 3,656
1 vote
0 answers
80 views

Sitecore 10 React JSS app to embed into non-Sitecore website

I did one POC with the help of this documentation for embedded JSS app. In this sample, Sitecore content which embedded app is consuming is in same Sitecore instance for Sitecore MVC site where we ...
1 vote
0 answers
99 views

Debug Sitecore JSS React while SSR

How can I debug the JSS React application while using SSR, how to run the application with SSR in local machine with default npm commands?
1 vote
2 answers
174 views

Handle CSS and JavaScript files in Sitecore Headless Implementation

I am looking for inputs to manage Static Resources (CSS and JS files) in headless implementation. Are you having single CSS and JS files for your Website and Components? Using one CSS and JS file ...
1 vote
1 answer
110 views

Using vhost for JSS Multi-site setup on Azure App Service

I have a headless proxy multisite setup locally using JSS. I have two sites, SiteA and SiteB. I'm using vhost in node to serve as a middleware to resolve the hostname. http://expressjs.com/en/...
  • 383
1 vote
1 answer
794 views

Error: spawn 'Files\Git\dist\' ENOENT - The system cannot find the path specified

I have installed a fresh Sitecore 9.2 install and I'm trying to deploy an existing react solution to my local. When I run the npm build task I get the following error. > my-sitecore-site@1.2.0 ...
  • 383