Skip to content

Commit 1a9d32d

Browse files
committed
Fix project creation when template v2 is used
1 parent b5af4bc commit 1a9d32d

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)