-
Notifications
You must be signed in to change notification settings - Fork 235
chore: improve code error message for missing Angular project in angu… #923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Good idea. Perhaps we should write angular.json or project.json because Nx uses the latter one. |
|
||
if (!projectConfig) { | ||
throw new Error(`Project ${projectName} not found!`); | ||
throw new Error(`Project ${projectName} not found in angular.json.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error(`Project ${projectName} not found in angular.json.`); | |
throw new Error(`Project ${projectName} not found in Angular workspace (angular.json or project.json).`); |
|
||
if (!projectConfig) { | ||
throw new Error(`Project ${projectName} not found!`); | ||
throw new Error(`Project ${projectName} not found in angular.json.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error(`Project ${projectName} not found in angular.json.`); | |
throw new Error(`Project ${projectName} not found in Angular workspace (angular.json or project.json).`); |
|
||
if (!projectConfig) { | ||
throw new Error(`Project ${projectName} not found!`); | ||
throw new Error(`Project ${projectName} not found in angular.json.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error(`Project ${projectName} not found in angular.json.`); | |
throw new Error(`Project ${projectName} not found in Angular workspace (angular.json or project.json).`); |
|
||
if (!projectConfig) { | ||
throw new Error(`Project ${projectName} not found!`); | ||
throw new Error(`Project ${projectName} not found in angular.json.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error(`Project ${projectName} not found in angular.json.`); | |
throw new Error(`Project ${projectName} not found in Angular workspace (angular.json or project.json).`); |
|
||
if (!projectConfig) { | ||
throw new Error(`Project ${projectName} not found!`); | ||
throw new Error(`Project ${projectName} not found in angular.json.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error(`Project ${projectName} not found in angular.json.`); | |
throw new Error(`Project ${projectName} not found in Angular workspace (angular.json or project.json).`); |
I have updated all instances of:
to
because my team and I (due to our own oversight in not reading the documentation) had difficulty, as we thought we needed to use the property name in webconfig instead of the project name.
So, I’m suggesting this change to make the error message more descriptive, which could save time for others in the future (if you agree).