Skip to content

Commit c08b575

Browse files
author
Fatme
authored
Merge pull request #3662 from NativeScript/fatme/fix-template-v2
fix(project): fix project creation when template v2 is used
2 parents fdd81c2 + 1a9d32d commit c08b575

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/project-service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ export class ProjectService implements IProjectService {
7979
ignoreScripts
8080
});
8181

82-
const templatePackageJson = this.$fs.readJson(path.join(templatePath, constants.PACKAGE_JSON_FILE_NAME));
82+
const templatePackageJsonPath = templateVersion === constants.TemplateVersions.v2 ? path.join(projectDir, constants.PACKAGE_JSON_FILE_NAME) : path.join(templatePath, constants.PACKAGE_JSON_FILE_NAME);
83+
const templatePackageJson = this.$fs.readJson(templatePackageJsonPath);
8384

8485
await this.$npm.uninstall(templatePackageJson.name, { save: true }, projectDir);
8586
if (templateVersion === constants.TemplateVersions.v2) {

0 commit comments

Comments
 (0)