Skip to main content
1 of 2

After upgrading to angular 15 sitecore experience editor is throwing error: ES Modules may not assign module.exports or exports

We have recently upgraded to angular 15 for sitecore. Everything works fine except for the experience editor. We are getting the following. I am suspicious that sitecore is not fully ready for angular 15? Thanks in advance.

Error Rendering Sitecore.JavaScriptServices.ViewEngine.Presentation.JsLayoutRenderer: ES Modules may not assign module.exports or exports., Use ESM export syntax, instead: 99534 Error: ES Modules may not assign module.exports or exports., Use ESM export syntax, instead: 99534 at Object.set [as exports] (C:\inetpub\wwwroot\dist\EmployerAdminPortal\server.bundle.js:14:6392553) at 99534 (C:\inetpub\wwwroot\dist\EmployerAdminPortal\server.bundle.js:14:2878721) at webpack_require (C:\inetpub\wwwroot\dist\EmployerAdminPortal\server.bundle.js:14:6391825) at C:\inetpub\wwwroot\dist\EmployerAdminPortal\server.bundle.js:14:6393006 at Object. (C:\inetpub\wwwroot\dist\EmployerAdminPortal\server.bundle.js:14:6393258) at Module._compile (node:internal/modules/cjs/loader:1159:14) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Module.load (node:internal/modules/cjs/loader:1037:32) at Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1061:19) 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)