Following the tutorial everything is looking good. The app deploys with no errors using jss deploy app --includeContent --includeDictionary.

I can see the content in Sitecore so thats all good.

However when I view the site I get the following error:

Error Rendering Sitecore.JavaScriptServices.ViewEngine.Presentation.JsLayoutRenderer: GraphQL error: Unknown type GraphQLConnectedDemo. GraphQL error: Unknown type AppRoute. GraphQL error: Unknown type AppRoute. Error: GraphQL error: Unknown type GraphQLConnectedDemo. GraphQL error: Unknown type AppRoute. GraphQL error: Unknown type AppRoute. at new t (C:\inetpub\wwwroot\S901\dist\example\server.bundle.js:31:327641) at C:\inetpub\wwwroot\S901\dist\example\server.bundle.js:31:346419 at C:\inetpub\wwwroot\S901\dist\example\server.bundle.js:31:353104 at Array.forEach () at C:\inetpub\wwwroot\S901\dist\example\server.bundle.js:31:353084 at Map.forEach () at e.broadcastQueries (C:\inetpub\wwwroot\S901\dist\example\server.bundle.js:31:352991) at Object.next (C:\inetpub\wwwroot\S901\dist\example\server.bundle.js:31:353850) at m (C:\inetpub\wwwroot\S901\dist\example\server.bundle.js:31:404472) at y (C:\inetpub\wwwroot\S901\dist\example\server.bundle.js:31:404838)
   at Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.Http.HttpNodeInstance.InvokeExport[T](NodeInvocationInfo invocationInfo)
   at Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.OutOfProcessNodeInstance.InvokeExport[T](String moduleName, String exportNameOrNull, Object[] args)
   at Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.InvokeExportWithPossibleRetry[T](String moduleName, String exportedFunctionName, Object[] args, Boolean allowRetry)
   at Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.InvokeExport[T](String moduleName, String exportedFunctionName, Object[] args)
   at Sitecore.JavaScriptServices.ViewEngine.Node.NodeRenderEngine.Invoke[T](String moduleName, String functionName, Object[] functionArgs)
   at Sitecore.JavaScriptServices.ViewEngine.Presentation.JssRenderer.PerformRender(TextWriter writer, IRenderEngine renderEngine, String moduleName, String functionName, Object[] functionArgs)
   at Sitecore.JavaScriptServices.ViewEngine.Presentation.JssRenderer.Render(TextWriter writer)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)

Any ideas?

Thanks!

  • Check also that the site templates, if any, are published. This issue is caused by the site's GraphQL API not being able to find an expected template in Sitecore - and thus not exposing that type to GraphQL. If you load up /api/jssappname/ui?sc_apikey={yourapikey} that may provide insights into what is available and what is not in GraphQL. The Docs button will let you browse the schema. – Kam Figy Nov 8 at 18:58

Recycling the IIS app pool once will resolve this issue. This is a bug that we fixed in the generally available release.

  • This didn't work for Dave – user1069816 Nov 8 at 11:29

I also had this same error, for me the issue was that I'd used the wrong url during jss setup.

Check /scjssconfig.json in your React project and verify that "deployUrl" and "layoutServiceHost" match what is configured in sitecore in App_Config\Include\zzz\<your project name>.config under <site hostname="">.

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.