Posted 18 December 2024, 2:16 am EST - Updated 18 December 2024, 3:21 am EST
I am using SpreadJS in a web application built with NextJS v14.2.14. I want to set a license key for all the spreadsheets in the application, so I have set the license in a file named AppProvider, which is a client component, as shown below:
'use client'
import GC from '@mescius/spread-sheets'
export default function AppProvider({
children
}: {
children: React.ReactNode
}) {
GC.Spread.Sheets.LicenseKey = 'my key'
GC.Spread.Common.CultureManager.culture('my culture')
return (
<AppContext.Provider>
{children}
</AppContext.Provider>
)
}
The children here represent all the pages in my web application. However, after setting the license key, I often encounter a 500 error.
This issue occurs on all pages of the application. Could anyone help me understand what might be causing this problem or suggest a possible solution?