Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

Commit 17c9dea

Browse files
christophehurpeaugeowarin
authored andcommitted
moduleNotFound: add file where the module is missing (#25)
1 parent 89f5669 commit 17c9dea

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/formatters/moduleNotFound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function formatErrors (errors) {
2525
return concat(
2626
dependenciesNotFound(errors.length),
2727
'',
28-
errors.map(e =>`* ${e.module}`),
28+
errors.map(e =>`* ${e.module}${e.file ? ` in ${e.file}` : ''}`),
2929
'',
3030
forgetToInstall(errors.length)
3131
);

test/integration.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ it('integration : module-errors', async() => {
4949
'',
5050
'These dependencies were not found in node_modules:',
5151
'',
52-
'* ./non-existing',
53-
'* not-found',
52+
'* ./non-existing in ./test/fixtures/module-errors/index.js',
53+
'* not-found in ./test/fixtures/module-errors/index.js',
5454
'',
5555
'Did you forget to run npm install --save for them?'
5656
]);
@@ -125,8 +125,8 @@ it('integration : webpack multi compiler : module-errors', async() => {
125125
'',
126126
'These dependencies were not found in node_modules:',
127127
'',
128-
'* ./non-existing',
129-
'* not-found',
128+
'* ./non-existing in ./test/fixtures/multi-compiler-module-errors/index.js',
129+
'* not-found in ./test/fixtures/multi-compiler-module-errors/index2.js',
130130
'',
131131
'Did you forget to run npm install --save for them?'
132132
]);

0 commit comments

Comments
 (0)