Package post-install scripts run on "npm install". Currently, the script for kendo-licensing executes "kendo-ui-license activate" for convenience. It does not fail if a license is missing.
That said, your suggestion is very reasonable. It should be possible to assert that a license has been imported at build-time.
To make this possible, we've decided to change the behavior of the "kendo-ui-license activate" command. It would return a non-zero value when the license is missing. You need to execute it as part of your build script to assert that the activation is successful. The post-install script would still succeed to avoid breaking "npm install".
Caching does not affect the result from the "activate" operation.
These changes are not yet deployed. You can try them out by installing the development version of kendo-licensing: "npm install --save @progress/kendo-licensing@dev".
You should not see failures when running "npm install", at least not due to the license check. What is the error message that you see?
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.