Skip to content

Commit 6d12b53

Browse files
Dimitar TachevDimitar Tachev
authored andcommitted
fix: uninstall the template before npm i in the project in order to avoid getting npm i in a linked template
1 parent cff6778 commit 6d12b53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/services/project-service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ export class ProjectService implements IProjectService {
7575
this.removeMergedDependencies(projectDir, templatePackageJsonContent);
7676
}
7777

78+
if (templateVersion === constants.TemplateVersions.v1) {
79+
await this.$npm.uninstall(templatePackageJsonContent.name, { save: true }, projectDir);
80+
}
81+
7882
// Install devDependencies and execute all scripts:
7983
await this.$npm.install(projectDir, projectDir, {
8084
disableNpmInstall: false,
8185
frameworkPath: null,
8286
ignoreScripts
8387
});
84-
85-
if (templateVersion === constants.TemplateVersions.v1) {
86-
await this.$npm.uninstall(templatePackageJsonContent.name, { save: true }, projectDir);
87-
}
8888
} catch (err) {
8989
this.$fs.deleteDirectory(projectDir);
9090
throw err;

0 commit comments

Comments
 (0)