Skip to content

Commit 6e4e0ae

Browse files
arekkasAeneas Rekkas (arekkas)
authored and
Aeneas Rekkas (arekkas)
committed
openBrowser() causes docker-compose set ups to fail because of spawn EACCESS - closes #710
Signed-off-by: Aeneas Rekkas (arekkas) <[email protected]>
1 parent ba34b0b commit 6e4e0ae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/react-scripts/scripts/start.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ function openBrowser(port, protocol) {
170170
}
171171
// Fallback to opn
172172
// (It will always open new tab)
173-
opn(protocol + '://localhost:' + port + '/');
173+
try {
174+
opn(protocol + '://localhost:' + port + '/');
175+
} catch (err) {
176+
console.log('Unable to automatically open ' +protocol + '://localhost:' + port + '/ because ', err)
177+
}
174178
}
175179

176180
// We need to provide a custom onError function for httpProxyMiddleware.

0 commit comments

Comments
 (0)