Skip to content
Browse files

Fix ENOENT when react-native init with --verbose on Windows

As PR #5171 was reverted in 521bd03 for breaking reason, ENOENT again in issues #5169 , this commit fix it ref to nodejs/node-v0.x-archive#2318 (comment) , and this is the smallest change in file to fix such Windows platform specific bug tdzl2003 mkonicek snowdream sunnylqm
Closes #10086

Differential Revision: D3919761

Pulled By: bestander

fbshipit-source-id: b878bbade8142a87bd6703d485e501eb28761af5
  • Loading branch information...
flyskywhy authored and Facebook Github Bot 7 committed Sep 25, 2016
1 parent 9f792c2 commit 2289909374f1aabf4232b4578aaee176b989edaa
Showing with 1 addition and 1 deletion.
  1. +1 −1 react-native-cli/index.js
@@ -230,7 +230,7 @@ function run(root, projectName, rnPackage) {

function runVerbose(root, projectName, rnPackage) {
var proc = spawn('npm', ['install', '--verbose', '--save', '--save-exact', getInstallPackage(rnPackage)], {stdio: 'inherit'});
var proc = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['install', '--verbose', '--save', '--save-exact', getInstallPackage(rnPackage)], {stdio: 'inherit'});
proc.on('close', function (code) {
if (code !== 0) {
console.error('`npm install --save --save-exact react-native` failed');

0 comments on commit 2289909

Please sign in to comment.
You can’t perform that action at this time.