{"record":{"id":"724cbb4e43038b4e","repo":"abpframework/abp","slug":"abp-ng-schematics-npm-package-should-be-install","errorCode":null,"errorMessage":"\"@abp/ng.schematics\" NPM package should be installed to the devDependencies before running this command!","messagePattern":"\"@abp/ng\\.schematics\" NPM package should be installed to the devDependencies before running this command!","errorType":"exception","errorClass":"CliUsageException","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs","lineNumber":115,"sourceCode":"    }\n\n    private async Task CheckNgSchematicsAsync()\n    {\n        var packageJsonPath = $\"package.json\";\n\n        if (!File.Exists(packageJsonPath))\n        {\n            throw new CliUsageException(\n                \"package.json file not found\"\n            );\n        }\n\n        var schematicsVersion =\n            (string)JObject.Parse(File.ReadAllText(packageJsonPath))[\"devDependencies\"]?[\"@abp/ng.schematics\"];\n\n        if (schematicsVersion == null)\n        {\n            throw new CliUsageException(\n                \"\\\"@abp/ng.schematics\\\" NPM package should be installed to the devDependencies before running this command!\"\n            );\n        }\n\n        var parsed = SemanticVersion.TryParse(schematicsVersion.TrimStart('~', '^', 'v'), out var semanticSchematicsVersion);\n        if (!parsed)\n        {\n            Logger.LogWarning(\"Couldn't determinate version of \\\"@abp/ng.schematics\\\" package.\");\n            return;\n        }\n\n        var cliVersion = await _cliVersionService.GetCurrentCliVersionAsync();\n        if (semanticSchematicsVersion < cliVersion)\n        {\n            Logger.LogWarning(\"\\\"@abp/ng.schematics\\\" version is lower than ABP Cli version.\");\n        }\n    }\n","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs#L97-L133","documentation":"After confirming package.json exists, CheckNgSchematicsAsync reads devDependencies['@abp/ng.schematics']. If the value is null (package not listed in devDependencies), it throws a CliUsageException. The schematics package is the engine that actually generates Angular proxy code, so its absence makes the command non-functional.","triggerScenarios":"Running Angular proxy generation in a project whose package.json does not list @abp/ng.schematics under devDependencies (only under dependencies, or not at all).","commonSituations":"Fresh checkout where 'npm install' has not been run; package removed during dependency cleanup; ABP version mismatch where schematics were renamed; copied package.json missing the devDependency.","solutions":["Run 'npm install @abp/ng.schematics --save-dev' (version matching your ABP release).","Run 'abp update' or 'npm install' to restore the dependency tree as defined in package.json.","Verify with 'npm ls @abp/ng.schematics' that the package resolves."],"exampleFix":"// before: package.json devDependencies has no @abp/ng.schematics\n// after\nnpm install @abp/ng.schematics@^7.0.0 --save-dev","handlingStrategy":"validation","validationCode":"var json = JObject.Parse(File.ReadAllText(\"package.json\"));\nif (json[\"devDependencies\"]?[\"@abp/ng.schematics\"] == null)\n{ Console.Error.WriteLine(\"@abp/ng.schematics missing from devDependencies.\"); return; }","typeGuard":"static bool HasNgSchematics(string packageJsonPath)\n{\n    var j = JObject.Parse(File.ReadAllText(packageJsonPath));\n    return j[\"devDependencies\"]?[\"@abp/ng.schematics\"] != null;\n}","tryCatchPattern":null,"preventionTips":["Pin @abp/ng.schematics in devDependencies at the same version as the ABP release.","Run 'npm install' after every clone to restore devDependencies."],"tags":["cli","service-proxy","angular","npm","missing-dependency"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}