From 4bd4de7a76a556816d3156fa323560c07c2c74f4 Mon Sep 17 00:00:00 2001 From: Kwonkunkun Date: Thu, 1 Dec 2022 01:57:10 +0900 Subject: [PATCH] Fix: react-native init command error --- test/test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test.ts b/test/test.ts index 208bec753..b774db5bc 100644 --- a/test/test.ts +++ b/test/test.ts @@ -308,13 +308,13 @@ class RNProjectManager extends ProjectManager { } mkdirp.sync(projectDirectory); - return TestUtil.getProcessOutput("react-native init " + appName, { cwd: projectDirectory, timeout: 30 * 60 * 1000 }) - .then((e) => { console.log(`"react-native init ${appName}" success. cwd=${projectDirectory}`); return e; }) + return TestUtil.getProcessOutput("npx react-native init " + appName, { cwd: projectDirectory, timeout: 30 * 60 * 1000 }) + .then((e) => { console.log(`"npx react-native init ${appName}" success. cwd=${projectDirectory}`); return e; }) .then(this.copyTemplate.bind(this, templatePath, projectDirectory)) .then(TestUtil.getProcessOutput.bind(undefined, TestConfig.thisPluginInstallString, { cwd: path.join(projectDirectory, TestConfig.TestAppName) })) .then(() => { return null; }) .catch((error) => { - console.log(`"react-native init ${appName} failed". cwd=${projectDirectory}`, error); + console.log(`"npx react-native init ${appName} failed". cwd=${projectDirectory}`, error); throw new Error(error); }); }