Search code examples
angularsyncfusion

syncfusion-license module is missing in npm repo


We used the synfusion chart libraries in our Angular SPA and tried to use the commercial license key to remove the water mark and unlock functionality. Instead of using the license key in the main.ts file of our Angular app, we tried using it in our CI pipeline as recommended here and realised that it throws an error when executing the npx syncfusion-license activate. This suggests that syncfusion-license is no longer available in the public npm repo. Does anyone know why it is not there? I have posted it on the syncfusion community forum too.

% npx syncfusion-license activate
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/syncfusion-license - Not found
npm ERR! 404 
npm ERR! 404  'syncfusion-license@*' is not in this registry.
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Syncfusion has introduced registering the license key by using the npx command in 20.2.36 (2022-06-30) version. There is no indication that it has been removed later in their change logs.


Solution

  • We understand that you are experiencing difficulties with license registration. Upon thorough validation of the reported scenario, we would like to inform you that Syncfusion-license activation is still available and has not been removed from the registry. We have not been able to replicate the scenario you are facing with license registration.

    Additionally, we suspect that our register license command is being attempted to call before installing node_modules in the application. This scenario can lead to the issue you reported. To assist you further, we have listed the steps to follow for registering the license using environment variable:

    Step 1: Delete @Syncfusion from node_modules directory and clear npm cache: npm cache clean --force.

    Step 2: Ensure that you use the same major version for all our Syncfusion packages in the package. json.

    Step 3: Install the packages. Make sure the node_modules are generated.

    Step 4: Now set the variable setx SYNCFUSION_LICENSE "replace your specific license key for the appropriate version".

    Step 5: Once you have set the SYNCFUSION_LICENSE environment variable, restart the IDE or application terminal before using the license activation command.

    Step 6: Now call the command npx syncfusion-license activate.

    Success message: Syncfusion License imported successfully.

    If you are using a license text file for regitration, you can skip steps 4 and 5 and replace the license key in the text file.