Skip to content

Commit f15ec19

Browse files
kgajerafilipesilva
authored andcommitted
fix(@schematics/angular): specify module option as a fix for the multiple module error
1 parent 3efda81 commit f15ec19

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)