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
style(CompileMetadataResolver): better error message #11401
Conversation
@@ -307,7 +307,7 @@ export class CompileMetadataResolver { | |||
const typeMetadata = flattenArray(meta.bootstrap).map(type => { | |||
if (!isValidType(type)) { | |||
throw new Error( | |||
`Unexpected value '${stringify(type)}' used in the bootstrap property of module '${stringify(moduleType)}'`); | |||
`Unexpected value '${stringify(type)}' used in the bootstrap property of module '${stringify(moduleType)}'`);p |
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.
;p
@@ -377,7 +377,7 @@ export class CompileMetadataResolver { | |||
const oldModule = this._ngModuleOfTypes.get(type); | |||
if (oldModule && oldModule !== moduleType) { | |||
throw new Error( | |||
`Type ${stringify(type)} is part of the declarations of 2 modules: ${stringify(oldModule)} and ${stringify(moduleType)}!`); | |||
`Type ${stringify(type)} is part of the declarations of 2 modules: ${stringify(oldModule)} and ${stringify(moduleType)}! Please consider moving ${stringify(type)} to a higher module that imports ${stringify(oldModule)} and ${stringify(moduleType)}. You can also create a new NgModule that exports and includes ${stringify(type)} then import that NgModule in ${stringify(oldModule)} and ${stringify(moduleType)}.`); |
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.
Please consider splitting the msg over multiple lines & squash the commits. Thanks
@vicb all green |
thanks Patrick |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.