Commit 5f6f3b4 1 parent a2bea83 commit 5f6f3b4 Copy full SHA for 5f6f3b4
File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,11 @@ function getPackageAureliaResources(packageJson) {
125
125
126
126
function getPackageMainDir ( packagePath ) {
127
127
const packageJson = getPackageJson ( packagePath ) ;
128
- const packageMain = packageJson && packageJson . aurelia && packageJson . aurelia . main && packageJson . aurelia . main [ 'native-modules' ] || packageJson . main || packageJson . browser ;
128
+ if ( ! packageJson ) {
129
+ console . error ( 'Unable to read the file: ' + packagePath ) ;
130
+ return null ;
131
+ }
132
+ const packageMain = packageJson . aurelia && packageJson . aurelia . main && packageJson . aurelia . main [ 'native-modules' ] || packageJson . main || packageJson . browser ;
129
133
return packageMain ? path . dirname ( path . join ( packagePath , packageMain ) ) : null ;
130
134
}
131
135
You can’t perform that action at this time.
0 commit comments