Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
igniteui-react-core navigator is not defined nextjs error
posted

I am using Igniteui-spreadhseet module inside my nextjs application and I am importing the modules dynamically as per the documentation(https://ko.infragistics.com/products/ignite-ui-react/react/components/nextjs-usage#additional-resources) but still I am getting navigator is not defined error which is blocker for building and deploying my application. 

Component: 

const RenderExcel = <T extends object>({

...

},

}: RenderExcelProps<T>): JSX.Element => {

const DynamicIgrSpreadsheet = dynamic(

async () => {

const { IgrSpreadsheet, IgrSpreadsheetModule } = await import(

"igniteui-react-spreadsheet"

);

const { IgrExcelXlsxModule, IgrExcelCoreModule, IgrExcelModule } =

await import("igniteui-react-excel");

IgrExcelCoreModule.register();

IgrExcelModule.register();

IgrExcelXlsxModule.register();

IgrSpreadsheetModule.register();

// eslint-disable-next-line react/display-name, @typescript-eslint/no-explicit-any

return React.forwardRef((props: IIgrSpreadsheetProps, ref: any) => {

return <IgrSpreadsheet ref={ref} {...props} />;

});

},

{ ssr: false },

);

...

<DynamicIgrSpreadsheet ... />

...);

};