bugfix #3997: react-native bundle not working on windows 10

Summary: fixes https://github.com/facebook/react-native/issues/3997

the root cause is in

Mon, 09 Nov 2015 13:22:47 GMT ReactNativePackager:SocketServer uncaught error Error: listen EACCES C:\Users\donald\AppData\Local\Temp\react-packager-9248a9803ac72b509b389b456696850d

This means that the socket server cannot create the socket.

cfr https://gist.github.com/domenic/2790533 the socket name is not a valid windows socket name.
Closes https://github.com/facebook/react-native/pull/4071

Reviewed By: mkonicek

Differential Revision: D2699546

Pulled By: davidaurelio

fb-gh-sync-id: 6c6494c14c42bb17506b8559001419c9f85e91e3
This commit is contained in:
Bram
2015-11-27 07:15:28 -08:00
committed by facebook-github-bot-4
parent 01a0facf33
commit 710b443af1
3 changed files with 11 additions and 3 deletions

View File

@@ -8,11 +8,11 @@
*/
'use strict';
const execFile = require('child_process').execFile;
const fs = require('fs');
const getAssetDestPathAndroid = require('./getAssetDestPathAndroid');
const getAssetDestPathIOS = require('./getAssetDestPathIOS');
const log = require('../util/log').out('bundle');
const mkdirp = require('mkdirp');
const path = require('path');
function saveAssets(
@@ -70,7 +70,7 @@ function copyAll(filesToCopy) {
function copy(src, dest, callback) {
const destDir = path.dirname(dest);
execFile('mkdir', ['-p', destDir], err => {
mkdirp(destDir, err => {
if (err) {
return callback(err);
}