0

I am using sitcore 10 with JSS and after deploying my angular app to sitecore, i got this error when trying to open the home page in experience editor.

Error Rendering Sitecore.JavaScriptServices.ViewEngine.Presentation.JsLayoutRenderer: document is not defined ReferenceError: document is not defined at AppComponent.setAttributesLangDir (C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:1373029) at new AppComponent (C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:1372677) at NodeInjectorFactory.AppComponent_Factory [as factory] (C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:1373304) at getNodeInjectable (C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:1859659) at instantiateRootComponent (C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:2022042) at createRootComponent (C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:2022233) at ComponentFactory$1.create (C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:2090564) at ApplicationRef.bootstrap (C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:2182938) at C:\inetpub\wwwroot\sc10.dev.localsc.dev.local\dist\atlp-informational-web\server.bundle.js:48147:2179644 at Array.forEach () 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)

is there any ideas about the reason of this error??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.