From c4426b34883d87433be430cb402c482bfdad0c63 Mon Sep 17 00:00:00 2001 From: ElenaDiachenko Date: Thu, 18 Jan 2024 14:32:54 +0200 Subject: [PATCH] install pkg-dir@7.0.0 before first run --- packages/engine-core/src/tasks/task.rnv.new.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/engine-core/src/tasks/task.rnv.new.ts b/packages/engine-core/src/tasks/task.rnv.new.ts index f6aa043b32..a4a86ab037 100644 --- a/packages/engine-core/src/tasks/task.rnv.new.ts +++ b/packages/engine-core/src/tasks/task.rnv.new.ts @@ -499,6 +499,10 @@ export const taskRnvNew = async (c: RnvContext) => { await executeAsync(`${isYarnInstalled() ? 'yarn' : 'npm'} add rnv@${c.rnvVersion}`, { cwd: c.paths.project.dir, }); + // Add pkg-dir to have the correct version before the first run + await executeAsync(`${isYarnInstalled() ? 'yarn' : 'npm'} add pkg-dir@7.0.0`, { + cwd: c.paths.project.dir, + }); // Check if node_modules folder exists if (!fsExistsSync(path.join(c.paths.project.dir, 'node_modules'))) {