Skip to content

Commit f9187bc

Browse files
dgp1130alan-agius4
authored andcommitted
refactor(@angular-devkit/core): update missing workspace file error to explicitly call out angular.json
Internally, we've gotten a lot of bugs of users running the CLI in the wrong directory and not understanding this error. Hopefully calling this out more explicitly will key users to double-check their working directory before filing a bug.
1 parent 4e189f4 commit f9187bc

File tree

1 file changed

+4
-1
lines changed
  • packages/angular_devkit/core/src/workspace

1 file changed

+4
-1
lines changed

packages/angular_devkit/core/src/workspace/core.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ export async function readWorkspace(
8181
}
8282
}
8383
if (!found) {
84-
throw new Error('Unable to locate a workspace file for workspace path.');
84+
throw new Error(
85+
'Unable to locate a workspace file for workspace path. Are you missing an `angular.json`' +
86+
' or `.angular.json` file?',
87+
);
8588
}
8689
} else if (format === undefined) {
8790
const filename = basename(normalize(path));

0 commit comments

Comments
 (0)