I am using Igniteui-spreadhseet module inside my nextjs application and I am importing the modules dynamically as per the documentation(https://es.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 ... />
...);
};
You're welcome, please let me know if you have some more questions on this matter.
Thanks Deyan for your quick response, I will wait for the fix from the dev side.
Hello Jeevan,
I have investigated your issue, and it turns out it is a bug. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 29842. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
As a workaround you can try adding polyfill or mock the global navigator object
You can view the status of the development issue connected to this case in the system on the web site.
Please let me know if you need more information.
Regards,
Deyan Kamburov,
Infragistics