angular/angular-cli · error · SchematicsException
Project name "${options.project}" doesn't not exist.
Error message
Project name "${options.project}" doesn't not exist. What it means
`addServerRoutingConfig` looks up the target Angular Workspace project by `options.project`. If the workspace definition contains no project with that exact name, it throws this SchematicsException (the message itself has a grammar typo, "doesn't not exist").
Source
Thrown at packages/schematics/angular/app-shell/index.ts:160
switch (name.kind) {
case ts.SyntaxKind.Identifier:
return name.getText() === propertyName;
case ts.SyntaxKind.StringLiteral:
return name.text === propertyName;
}
return false;
})[0];
return property;
}
function addServerRoutingConfig(options: AppShellOptions, isStandalone: boolean): Rule {
return async (host: Tree) => {
const workspace = await getWorkspace(host);
const project = workspace.projects.get(options.project);
if (!project) {
throw new SchematicsException(`Project name "${options.project}" doesn't not exist.`);
}
const configFilePath = isStandalone
? join(project.sourceRoot ?? 'src', 'app/app.config.server.ts')
: getServerModulePath(host, project.sourceRoot || 'src', 'main.server.ts');
if (!configFilePath || !host.exists(configFilePath)) {
throw new SchematicsException(`Cannot find "${configFilePath}".`);
}
const configSourceFile = getSourceFile(host, configFilePath);
const functionCall = findNodes(
configSourceFile,
ts.isCallExpression,
/** max */ undefined,
/** recursive */ true,
).find(
(n) => ts.isIdentifier(n.expression) && n.expression.getText() === 'provideServerRendering',View on GitHub (pinned to bb72145f9a)
Solutions
- Run with `--project=<exact-name>` using a name listed in angular.json `projects`
- Run `ng generate app-shell` inside the project directory or set `defaultProject`/cli default correctly
- Fix typos and case in the --project value
Example fix
// before ng g app-shell --project=my-appp // after ng g app-shell --project=my-app
Defensive patterns
Strategy: validation
Validate before calling
const workspace = JSON.parse(fs.readFileSync('angular.json', 'utf8'));
if (!workspace.projects?.[options.project]) {
throw new Error(`Project "${options.project}" not in angular.json. Available: ${Object.keys(workspace.projects).join(', ')}`);
} Try / catch
try {
await ngGenerate('app-shell', { project: projectName });
} catch (e) {
if (e.message.includes("doesn't not exist")) {
console.error(`Unknown project "${projectName}" — check angular.json projects key`);
} else throw e;
} Prevention
- Copy project names exactly from angular.json (names are case-sensitive)
- Pass --project explicitly in monorepos with multiple projects
- Update scripts after renaming a project
When it happens
Trigger: Running the app-shell schematic with `--project` set to a name that is not a key under `projects` in angular.json/workspace (typo, renamed project, or omitted default when multiple projects exist).
Common situations: Multi-project monorepos where the default project differs; project renamed in angular.json while scripts still use the old name; case-sensitive mismatch between the CLI flag and the workspace key.
Related errors
- Project "${projectName}" not found.
- Could not find a ${level} workspace. Are you in a project?
- Option "project" is required.
- Project is not defined in this workspace.
- Targets are not defined for this project.
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/163efdcee3ceccd3.
Report an issue: GitHub.