Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 69bba3a

Browse files
Kwonkunkunthewulf7
authored andcommitted
Fix: react-native init command error (#2377)
1 parent 8b49ddf commit 69bba3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,13 @@ class RNProjectManager extends ProjectManager {
305305
}
306306
mkdirp.sync(projectDirectory);
307307

308-
return TestUtil.getProcessOutput("react-native init " + appName, { cwd: projectDirectory, timeout: 30 * 60 * 1000 })
309-
.then((e) => { console.log(`"react-native init ${appName}" success. cwd=${projectDirectory}`); return e; })
308+
return TestUtil.getProcessOutput("npx react-native init " + appName, { cwd: projectDirectory, timeout: 30 * 60 * 1000 })
309+
.then((e) => { console.log(`"npx react-native init ${appName}" success. cwd=${projectDirectory}`); return e; })
310310
.then(this.copyTemplate.bind(this, templatePath, projectDirectory))
311311
.then<void>(TestUtil.getProcessOutput.bind(undefined, TestConfig.thisPluginInstallString, { cwd: path.join(projectDirectory, TestConfig.TestAppName) }))
312312
.then(() => { return null; })
313313
.catch((error) => {
314-
console.log(`"react-native init ${appName} failed". cwd=${projectDirectory}`, error);
314+
console.log(`"npx react-native init ${appName} failed". cwd=${projectDirectory}`, error);
315315
throw new Error(error);
316316
});
317317
}

0 commit comments

Comments
 (0)