You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason why this error occurs is because currently the upgrade logic relies on the existence of an ignite-ui-cli.json. Let me try to shed some light on what's happening.
First, the ng new igniteui/angular-schematics is executed and following the spawned prompt session a project is generated.
Then if the user has chosen to apply licensing, the following logic is executed:
In this context, the projTemplate can either point to packages\igx-templates\igx-ts\projects\_base\index.ts or packages\igx-templates\igx-ts-legacy\projects\_base\index.ts but these two files are more or less identical and they both define a upgradeIgniteUIPackages.
upgradeIgniteUIPackages will in turn execute updateWorkspace which points to packages/core/update/Update.ts. The logic in the updateWorkspace method attempts to load a config file, which refers to the ignite-ui-cli.json file. It does so because later it wants to find the framework which the update is called for as the logic was written with the mindset of supporting multiple platforms.
This is where the throw occurs:
When executing ng new igniteui/angular-schematics the config file does not yet exist, so the update logic cannot read the framework. Moreover, executing an Angular schematic should not have to rely on the existence of a config file, since the schematic can be executed outside of the CLI's context. One easy fix here is to just allow upgradeIgniteUIPackages to send the framework when we run the ng-new schematic, as we definitely know we are dealing with the Angular framework.
Description
Describe the issue.
Steps to reproduce
Result
There is an error:
Expected result
There shouldn't be an error when the license feed is chosen.
The text was updated successfully, but these errors were encountered: