diff --git a/lib/services/plugins-service.ts b/lib/services/plugins-service.ts index 37b639993c..9a0aaf13c2 100644 --- a/lib/services/plugins-service.ts +++ b/lib/services/plugins-service.ts @@ -189,13 +189,11 @@ export class PluginsService implements IPluginsService { public ensureAllDependenciesAreInstalled(): IFuture { return (() => { - if(!this.$fs.exists(path.join(this.$projectData.projectDir, constants.NODE_MODULES_FOLDER_NAME)).wait()) { - let command = "npm install "; - if(this.$options.ignoreScripts) { - command += "--ignore-scripts"; - } - this.$childProcess.exec(command, { cwd: this.$projectData.projectDir }).wait(); + let command = "npm install "; + if(this.$options.ignoreScripts) { + command += "--ignore-scripts"; } + this.$childProcess.exec(command, { cwd: this.$projectData.projectDir }).wait(); }).future()(); } diff --git a/test/npm-support.ts b/test/npm-support.ts index c78e5c4e5e..0a9b4fe2c4 100644 --- a/test/npm-support.ts +++ b/test/npm-support.ts @@ -192,7 +192,10 @@ describe("Npm support tests", () => { let scopedName = "@reactivex/rxjs"; let scopedModule = path.join(projectFolder, "node_modules", "@reactivex/rxjs"); let scopedPackageJson = path.join(scopedModule, "package.json"); - addDependencies(testInjector, projectFolder, {scopedName: "0.0.0-prealpha.3"}).wait(); + let dependencies: any = {}; + dependencies[scopedName] = "0.0.0-prealpha.3"; + // Do not pass dependencies object as the sinopia cannot work with scoped dependencies. Instead move them manually. + addDependencies(testInjector, projectFolder, {}).wait(); //create module dir, and add a package.json shelljs.mkdir("-p", scopedModule); fs.writeFile(scopedPackageJson, JSON.stringify({name: scopedName})).wait();