abpframework/abp · error · CliUsageException
angular.json file not found. You must run this command in th
Error message
angular.json file not found. You must run this command in the angular folder.
What it means
CheckAngularJsonFile looks for 'angular.json' in the current working directory and throws a CliUsageException if missing. angular.json is the Angular CLI workspace definition; the proxy generator relies on it to locate projects and source roots, so running outside the Angular workspace is fatal.
Source
Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs:139
if (!parsed)
{
Logger.LogWarning("Couldn't determinate version of \"@abp/ng.schematics\" package.");
return;
}
var cliVersion = await _cliVersionService.GetCurrentCliVersionAsync();
if (semanticSchematicsVersion < cliVersion)
{
Logger.LogWarning("\"@abp/ng.schematics\" version is lower than ABP Cli version.");
}
}
private static void CheckAngularJsonFile()
{
var angularPath = $"angular.json";
if (!File.Exists(angularPath))
{
throw new CliUsageException(
"angular.json file not found. You must run this command in the angular folder."
);
}
}
}
View on GitHub (pinned to 7ed43b1931)
Solutions
- cd into the folder containing angular.json (typically angular/) before running the command.
- Confirm the file exists: 'ls angular.json'.
- If your project uses the legacy .angular-cli.json, migrate to the modern angular.json workspace or upgrade the ABP Angular tooling.
Example fix
// before (run from backend project) abp generate-proxy -t ng // after cd ../angular/ abp generate-proxy -t ng
Defensive patterns
Strategy: validation
Validate before calling
if (!File.Exists("angular.json"))
{ Console.Error.WriteLine("Run this command from the Angular workspace folder."); return; } Prevention
- Run proxy generation from the Angular workspace root.
- Verify angular.json presence in automation before invoking the CLI.
When it happens
Trigger: Running Angular proxy generation from a directory that does not contain an Angular CLI workspace file (e.g. the .Net backend folder or repo root).
Common situations: Wrong working directory; the Angular app was created with a different toolchain and uses .angular-cli.json (legacy) or no workspace file; renamed/moved angular.json.
Related errors
- package.json file not found
- "@abp/ng.schematics" NPM package should be installed to the
- Specified directory does not exist.
- No project file(csproj) found in the directory.
- Option folder should be a directory.
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/67f0b759a2d24a30.
Report an issue: GitHub.