Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 166fc96

Browse files
kgajerafilipesilva
authored andcommittedJun 10, 2020
fix(@schematics/angular): specify module option as a fix for the multiple module error
1 parent bb66b55 commit 166fc96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎packages/schematics/angular/utility/find-module.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ export function findModule(host: Tree, generateDir: string,
100100
if (filteredMatches.length == 1) {
101101
return join(dir.path, filteredMatches[0]);
102102
} else if (filteredMatches.length > 1) {
103-
throw new Error('More than one module matches. Use skip-import option to skip importing '
104-
+ 'the component into the closest module.');
103+
throw new Error(
104+
'More than one module matches. Use the skip-import option to skip importing ' +
105+
'the component into the closest module or use the module option to specify a module.');
105106
}
106107

107108
dir = dir.parent;

0 commit comments

Comments
 (0)
Please sign in to comment.