Installed : C:\_ng\new_ig1>npm i -g @igniteui/angular-schematics
then run command below, and got the error, any advice why?
ng new igGrid2sch --collection="@igniteui/angular-schematics" --template=side-nav
Log:
[error] Error: Collection "@igniteui/angular-schematics" cannot be resolved.at SchematicEngineHost.resolve (C:\node_modules\@angular-devkit\schematics\tools\node-module-engine-host.js:75:19)at SchematicEngineHost._resolveCollectionPath (C:\node_modules\@angular-devkit\schematics\tools\node-module-engine-host.js:80:37)at SchematicEngineHost.createCollectionDescription (C:\node_modules\@angular-devkit\schematics\tools\file-system-engine-host-base.js:118:27)at SchematicEngine._createCollectionDescription (C:\node_modules\@angular-devkit\schematics\src\engine\engine.js:162:40)at SchematicEngine.createCollection (C:\node_modules\@angular-devkit\schematics\src\engine\engine.js:155:43)at NewCommand.getCollection (C:\node_modules\@angular\cli\models\schematic-command.js:143:35)at NewCommand.initialize (C:\node_modules\@angular\cli\models\schematic-command.js:62:37)at async NewCommand.validateAndRun (C:\node_modules\@angular\cli\models\command.js:121:22)at async Object.runCommand (C:\node_modules\@angular\cli\models\command-runner.js:224:24)at async default_1 (C:\node_modules\@angular\cli\lib\cli\index.js:70:31)
Also what would be the reason to use angular-schematics vs Ignite UI Cli , they seems like do the same.. I did not have problem to create new pj with Ignite UI CLI
Let's try again to see what is the problem.. I did the following, got the same result :
C:\_ng>npm i -g @igniteui/angular-schematics
> @igniteui/angular-schematics@12.0.803 preuninstall C:\Users\gkheysin\AppData\Roaming\npm\node_modules\@igniteui\angular-schematics> node ./scripts/uninstall.js
> @igniteui/angular-schematics@12.0.803 postinstall C:\Users\gkheysin\AppData\Roaming\npm\node_modules\@igniteui\angular-schematics> node ./scripts/install.js
+ @igniteui/angular-schematics@12.0.803updated 1 package in 20.252s
C:\_ng>cd new_ig1
C:\_ng\new_ig1>ng new --collection="@igniteui/angular-schematics"An unhandled exception occurred: Collection "@igniteui/angular-schematics" cannot be resolved.See "C:\Users\gkheysin\AppData\Local\Temp\1\ng-LsQndG\angular-errors.log" for further details.
then I've run
C:\_ng\new_ig1>npm config get prefixC:\Users\gkheysin\AppData\Roaming\npm
and check the contents, there is no \@angular-devkit.
It seems that I do trying to install @igniteui/angular-schematics globally.. do you see anything wrong with the sequence or what else could be a potential source of the problem?
I also did search through the whole c: drive for node-module-engine-host.js
It is located in the following global folder for npm :
C:\Users\gkheysin\AppData\Roaming\npm\node_modules\@igniteui\angular-schematics\node_modules\@angular-devkit\schematics\tools
Could it be that folder structure is the reason for error ?
Still, what could be potential reasons for the angular schematics giving the error while it was installed.
If there are ways to check the settings.. the log file not very helpful.
[error] Error: Collection "@igniteui/angular-schematics" cannot be resolved