I tried to deploy my JSS React App to Azure scaled CD. I got my Jss App deployed to Azure CM successfully and it's working as expected.

Steps to deploy to Azure CD

  1. The Azure scaled CD was setup by using the Azure ARM template from github (https://github.com/Sitecore/Sitecore-Azure-Quickstart-Templates/tree/master/Sitecore%209.0.2/XP)
  2. Copy the files in the Sitecore JavaScript Services Tech Preview Server 9.0.1 rev. 180724.zip to the wwwroot folder
  3. Copy the JssReactWeb.config and JssReactWeb.deploysecret.config manually to CD . The hostname in JssReactWeb.config is the CD url eg. mysite-sitecore-scaled-test-cd.azurewebsites.net and the deployment secret is same as CM
  4. I ran "jss deploy files" and the "wwwroot/dist/JssReactWeb" folder deployed successfully
  5. Approved and publish all the JSS items to web database

When I browse to the home page, I get the following error:

[ArgumentNullException: Value cannot be null. Parameter name: address] System.Net.WebClient.UploadString(String address, String data) +113
Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.Http.HttpNodeInstance.InvokeExport(NodeInvocationInfo invocationInfo) +155
Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.OutOfProcessNodeInstance.InvokeExport(String moduleName, String exportNameOrNull, Object[] args) +217
Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.InvokeExportWithPossibleRetry(String moduleName, String exportedFunctionName, Object[] args, Boolean allowRetry) +139
Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.InvokeExportWithPossibleRetry(String moduleName, String exportedFunctionName, Object[] args, Boolean allowRetry) +437
Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.InvokeExport(String moduleName, String exportedFunctionName, Object[] args) +91
Sitecore.JavaScriptServices.ViewEngine.Node.NodeRenderEngine.Invoke(String moduleName, String functionName, Object[] functionArgs) +144
Sitecore.JavaScriptServices.ViewEngine.Presentation.JssRenderer.PerformRender(TextWriter writer, IRenderEngine renderEngine, String moduleName, String functionName, Object[] functionArgs) +73
Sitecore.JavaScriptServices.ViewEngine.Presentation.JssRenderer.Render(TextWriter writer) +240
Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +147
Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +74 (Object , Object ) +14
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236 Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +195
Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer) +331
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +88
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList
1 filters, ActionResult actionResult) +81
System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +39

Has anyone experience this error before?

The issue was the Node version is not set on the CD app service. If the node version is not set, it will default to node 0.11.

To set the node version, go to Azure portal -> your app service -> Application Settings, add a new app setting Name: WEBSITE_NODE_DEFAULT_VERSION Value: node version

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.