File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -137,13 +137,21 @@ export class NpmInstallationManager implements INpmInstallationManager {
137137 return ( ( ) : boolean => {
138138 let shasumProperty = "dist.shasum" ;
139139 let cachedPackagePath = this . getCachedPackagePath ( packageName , version ) ;
140- let realShasum = this . $npm . view ( `${ packageName } @${ version } ` , shasumProperty ) . wait ( ) [ version ] [ shasumProperty ] ;
140+ let packageInfo = this . $npm . view ( `${ packageName } @${ version } ` , shasumProperty ) . wait ( ) ;
141+
142+ if ( _ . isEmpty ( packageInfo ) ) {
143+ // this package has not been published to npmjs.org yet - perhaps manually added via --framework-path
144+ this . $logger . trace ( `Checking shasum of package ${ packageName } @${ version } : skipped because the package was not found in npmjs.org` ) ;
145+ return true ;
146+ }
147+
148+ let realShasum = packageInfo [ version ] [ shasumProperty ] ;
141149 let packageTgz = cachedPackagePath + ".tgz" ;
142150 let currentShasum = "" ;
143151 if ( this . $fs . exists ( packageTgz ) . wait ( ) ) {
144152 currentShasum = this . $fs . getFileShasum ( packageTgz ) . wait ( ) ;
145153 }
146- this . $logger . trace ( `Checking shasum of package: ${ packageName } @${ version } : expected ${ realShasum } , actual ${ currentShasum } .` ) ;
154+ this . $logger . trace ( `Checking shasum of package ${ packageName } @${ version } : expected ${ realShasum } , actual ${ currentShasum } .` ) ;
147155 return realShasum === currentShasum ;
148156 } ) . future < boolean > ( ) ( ) ;
149157 }
You can’t perform that action at this time.
0 commit comments