File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -189,13 +189,11 @@ export class PluginsService implements IPluginsService {
189
189
190
190
public ensureAllDependenciesAreInstalled ( ) : IFuture < void > {
191
191
return ( ( ) => {
192
- if ( ! this . $fs . exists ( path . join ( this . $projectData . projectDir , constants . NODE_MODULES_FOLDER_NAME ) ) . wait ( ) ) {
193
- let command = "npm install " ;
194
- if ( this . $options . ignoreScripts ) {
195
- command += "--ignore-scripts" ;
196
- }
197
- this . $childProcess . exec ( command , { cwd : this . $projectData . projectDir } ) . wait ( ) ;
192
+ let command = "npm install " ;
193
+ if ( this . $options . ignoreScripts ) {
194
+ command += "--ignore-scripts" ;
198
195
}
196
+ this . $childProcess . exec ( command , { cwd : this . $projectData . projectDir } ) . wait ( ) ;
199
197
} ) . future < void > ( ) ( ) ;
200
198
}
201
199
Original file line number Diff line number Diff line change @@ -192,7 +192,10 @@ describe("Npm support tests", () => {
192
192
let scopedName = "@reactivex/rxjs" ;
193
193
let scopedModule = path . join ( projectFolder , "node_modules" , "@reactivex/rxjs" ) ;
194
194
let scopedPackageJson = path . join ( scopedModule , "package.json" ) ;
195
- addDependencies ( testInjector , projectFolder , { scopedName : "0.0.0-prealpha.3" } ) . wait ( ) ;
195
+ let dependencies : any = { } ;
196
+ dependencies [ scopedName ] = "0.0.0-prealpha.3" ;
197
+ // Do not pass dependencies object as the sinopia cannot work with scoped dependencies. Instead move them manually.
198
+ addDependencies ( testInjector , projectFolder , { } ) . wait ( ) ;
196
199
//create module dir, and add a package.json
197
200
shelljs . mkdir ( "-p" , scopedModule ) ;
198
201
fs . writeFile ( scopedPackageJson , JSON . stringify ( { name : scopedName } ) ) . wait ( ) ;
You can’t perform that action at this time.
0 commit comments