registerLicense('key_xxxxxxxxxxxxxx') not work in nuxt

Hi Syncfusion Team,

TypeError {
  stack: "Cannot read properties of undefined (reading 'syncfusionLicenseKey')\n" +
  'at registerLicense (my-project/node_modules/.pnpm/@[email protected]/node_modules/@syncfusion/ej2-base/src/validate-lic.js:374:18)\n' +
  message: "Cannot read properties of undefined (reading 'syncfusionLicenseKey')",
}

```

Error:

TypeError: Cannot read properties of undefined (reading 'syncfusionLicenseKey')

This happens when registerLicense() runs during SSR.

Behavior:

  • 31.x.xSSR: true → ❌ Not working

  • 31.x.xSSR: false → ✔️ Works

  • 29.x.xSSR: true/false → ✔️ Works

It seems version 31 has an SSR compatibility issue with license validation.


1 Reply

DA Deepika Arumugasamy Syncfusion Team December 1, 2025 02:24 PM UTC

Hi Chamroeun,

Thank you for reaching out.

Our Syncfusion licenses are version-specific, and if multiple major versions of our components are used in the same application, it can create version conflicts. Therefore, please make sure that you use the same version for all Syncfusion components.


Instead of registering license through registerLicense method, you can also register the license through the npx command as an alternative approach. You can register the Syncfusion license in text file and activate through npx command following the below steps:

  1. Create a license text file:

    • In the application root directory, create a file named syncfusion-license.txt and paste your Syncfusion license key inside it.
  2. Clear cache to avoid conflicts:

    • Remove the .nuxt folder from the root directory and .cache folder (if exists)from node_modules

  3. Activate the license key:

    • Open a command prompt in the application root directory and execute:

      npx syncfusion-license activate

  4. Verify activation:

    • Once the license key is activated, you should see the following console message:

      (INFO) Syncfusion License imported successfully.

  5. Run the application:

    • Restart your application



Refer to the documentation for more reference: Register Syncfusion license key using the npx command


Please refer our below documentation licensing FAQ's



If the issue persists, kindly share the package.json file and license key, so that we can provide a prompt solution.


Regards,

Deepika



Loader.
Up arrow icon