@@ -3,12 +3,9 @@ import * as semver from "semver";
33import * as constants from "./constants" ;
44
55export class NpmInstallationManager implements INpmInstallationManager {
6- private static NPM_LOAD_FAILED = "Failed to retrieve data from npm. Please try again a little bit later." ;
7-
86 constructor ( private $npm : INodePackageManager ,
97 private $childProcess : IChildProcess ,
108 private $logger : ILogger ,
11- private $errors : IErrors ,
129 private $options : IOptions ,
1310 private $fs : IFileSystem ,
1411 private $staticConfig : IStaticConfig ) {
@@ -35,7 +32,6 @@ export class NpmInstallationManager implements INpmInstallationManager {
3532 }
3633
3734 public async install ( packageName : string , projectDir : string , opts ?: INpmInstallOptions ) : Promise < any > {
38-
3935 try {
4036 let packageToInstall = this . $options . frameworkPath || packageName ;
4137 let pathToSave = projectDir ;
@@ -45,7 +41,8 @@ export class NpmInstallationManager implements INpmInstallationManager {
4541 return await this . installCore ( packageToInstall , pathToSave , version , dependencyType ) ;
4642 } catch ( error ) {
4743 this . $logger . debug ( error ) ;
48- this . $errors . fail ( "%s. Error: %s" , NpmInstallationManager . NPM_LOAD_FAILED , error ) ;
44+
45+ throw new Error ( error ) ;
4946 }
5047 }
5148
0 commit comments