My new blog present here.

Featured Post

Insights into Sitecore Search: A Definitive Introduction

A key component of digital experience management is effective information retrieval. A simplified approach is required for websites, applications, and platforms containing a lot of material so that consumers can easily get the data they require. This need is met by Sitecore, a well-known name in the field of digital experience platforms (DXPs), which provides powerful and comprehensive search functionality. We will travel into the realm of Sitecore Search in this article, learning about its capabilities, architecture , and the enormous value it offers both developers and end users. Introduction to Sitecore Search    A headless content discovery platform powered by AI , Sitecore Search enables you to build predictive and custom search experiences across various content sources. To extract and index you

Sitecore Error Troubleshooting: Node.js error while setting Sitecore JSS Integrated Mode



Sitecore Error Troubleshooting: Node.js error while setting Sitecore JSS Integrated Mode

Problem Statement:

I was setting up the new machine with Sitecore Experience Platform 9.3 Initial Release and was successfully able to setup. After that I tried creating the Sitecore JSS Sample App and successfully able to use the sample app in Disconnected Application mode.

 Error-1: 
Once I tried deploying sample app into Sitecore using Integrated Mode and tried accessing the sample in Sitecore Experience Editor and I started getting following error:

As a prerequisite of Sitecore JSS I already installed the Node.js latest version and it was running successfully, and did the verification of following items:
  •  Checked the Node.js version:
   

   • Checked the Path of Node.js in Environment Variables :
   

  •  Restarted the system also.

  All of the above steps didn’t help in opening the sample in Sitecore Experience Editor.

Error-2: 
Other error with while opening Sitecore JSS Site in Sitecore Horizon 9.3.0: "Failed to render a page: Failed to render the root extension, with error: Failed to render a fragment. Status code: InternalServerError, message: "


Solution:

For Error-1: 
By default, the JSS Node engine will use your PATH variable and this setting defined on Sitecore instance (with JSS installed) at App_Config/Sitecore/JavaScriptServices/Sitecore.JavaScriptServices.ViewEngine.Node.config


In my case Sitecore JSS Framework was not able to recognize the path of Node.exe from the system/environment PATH variable.

With the help of Sitecore Stack Exchange Discussion Rendering Sitecore.JavaScriptServices.ViewEngine.Presentation.JsLayoutRenderer: Failed to start Node process, I found the solution to resolve error “Rendering Sitecore.JavaScriptServices.ViewEngine.Presentation.JsLayoutRenderer: Failed to start Node process. To resolve this: [1] Ensure that Node.js is installed and can be found in one of the PATH directories. Current PATH environment variable is:” we can add patch config which will inform Sitecore JSS engine to look for Node.js exe from particular location.
We can directly update /configuration/sitecore/javaScriptServices/renderEngines/renderEngine/instance/NodePath value at App_Config/Sitecore/JavaScriptServices/Sitecore.JavaScriptServices.ViewEngine.Node.config but good practice is to utilize the patch the config file.

After above fix, I was able to access the Sitecore JSS app in Integrated mode.

For Error-2:
After fixing of Error#1, I thought that Horizon application will be able to recognize the Node.exe path but it was not happening. Even I tried by adding the patch config for node.js in Horizon web app and tried .NET core (Horizon Application build using .NET Core Framework) related configuration also.

At the end, I placed the copy of node.exe file from C:\Program Files\nodejs to web root of Horizon Web application (Sitecore will create separate web application for Horizon) because when web application will initialize it will start looking into required resources in their own folders where it installed, for example if you are using any binaries in your webapplication then during start of application it will first find referenced binaries in local folder and after that it will look for Global Assembly Cache.

After above fix, I was able to access the Sitecore JSS app in Sitecore Horizon Application.

I hope this post will guide you to resolve the error “Failed to start Node process. To resolve this: [1] Ensure that Node.js is installed and can be found in one of the PATH directories. Current PATH environment variable is”.


Pingback:
 • Sitecore JSS installation
 • Sitecore JSS modes
 • Failed to start process node exec not found
 • Sitecore ensure that node.js is installed and can be found in one of the path directories
 • Install Sitecore Horizon
 • Sitecore Experience Platform

Comments

Popular posts from this blog

Sitecore GraphQL Queries

Configuring Sitecore Next.js Headless SXA Multisite App in a Sitecore Container

Sitecore Experience Manager Cloud (XM Cloud) Building blocks