File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,13 @@ export async function run(
84
84
let human = path . relative ( path . join ( process . cwd ( ) , "node_modules" ) , loc ) ;
85
85
human = human . replace ( new RegExp ( `${ path . sep } node_modules${ path . sep } ` , "g" ) , " > " ) ;
86
86
87
- if ( ! ( await fs . exists ( loc ) ) ) {
88
- reporter . error ( `Module not installed: ${ human } ` ) ;
87
+ let pkgLoc = path . join ( loc , "package.json" ) ;
88
+ if ( ! ( await fs . exists ( loc ) ) || ! ( await fs . exists ( pkgLoc ) ) ) {
89
+ reporter . error ( `Module ${ human } not installed` ) ;
89
90
valid = false ;
90
91
}
91
92
92
- let pkg = await fs . readJson ( path . join ( loc , "package.json" ) ) ;
93
+ let pkg = await fs . readJson ( pkgLoc ) ;
93
94
94
95
let deps = Object . assign ( { } , pkg . dependencies , pkg . devDependencies , pkg . peerDependencies ) ;
95
96
@@ -111,6 +112,7 @@ export async function run(
111
112
`Module ${ human } depends on ${ name } with the range ${ range } but it doesn't match the ` +
112
113
`installed version of ${ depPkg . version } `
113
114
) ;
115
+ valid = false ;
114
116
}
115
117
}
116
118
}
You can’t perform that action at this time.
0 commit comments