From 6e4e0ae34addd8f642e493438456224452b9de50 Mon Sep 17 00:00:00 2001 From: Aeneas Date: Fri, 23 Sep 2016 10:36:54 +0200 Subject: [PATCH 1/2] openBrowser() causes docker-compose set ups to fail because of spawn EACCESS - closes #710 Signed-off-by: Aeneas Rekkas (arekkas) --- packages/react-scripts/scripts/start.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 19163169457..4c52de6dd29 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -170,7 +170,11 @@ function openBrowser(port, protocol) { } // Fallback to opn // (It will always open new tab) - opn(protocol + '://localhost:' + port + '/'); + try { + opn(protocol + '://localhost:' + port + '/'); + } catch (err) { + console.log('Unable to automatically open ' +protocol + '://localhost:' + port + '/ because ', err) + } } // We need to provide a custom onError function for httpProxyMiddleware. From 18a1b018939b142ceab047b6b0a890545151b1f3 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 23 Sep 2016 11:33:05 +0100 Subject: [PATCH 2/2] Ignore errors --- packages/react-scripts/scripts/start.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 4c52de6dd29..e14b390e7e2 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -173,7 +173,7 @@ function openBrowser(port, protocol) { try { opn(protocol + '://localhost:' + port + '/'); } catch (err) { - console.log('Unable to automatically open ' +protocol + '://localhost:' + port + '/ because ', err) + // Ignore errors. } }