Closed aliabuthahir closed 8 years ago
see https://github.com/pwnall/node-open/issues/55 I'll look into a cleaner way to open a browser window in a cross-platform way.
The quick fixes are:
1) edit the start task in package.json:
"start": "concurrently \"npm run server\" \"npm run docker-client\"",
*note: with this option you will then need to manually open http://localhost:2368 (assuming the default configuration)
2) edit the delayed open task in package.json:
"delayed-open": "sleep 5 && start http://localhost:2368",
3) simply run npm run docker-client
If you would like to try Docker Beta for Windows (recommended) you can use the following approach:
Steps:
docker-compose up
notes:
docker-compose pull
yep!
manually we are able to open the app in web browser. may be we need a fix in the script for the generator, since it feels like a dependency failure.
Hi,
I've attached the npm debug log for your perusal. Also as we know it probably is not a npm issue.
Regards, Ali
23 error Failed at the app@0.0.0 delayed-open script 'sleep 5 && opn http://localhost:2368'.
That's strange, in the log, it's "opn" instead of "open"
yep!
modified the package.json to make use of 'opn' npm package instead of 'open' for the later was failing.
Regards, Ali
Ahh, thanks. F.Y.I. I do accept Pull Requests.
@aliabuthahir The delayed open is really just there to prevent the browser from displaying not-found messages. Sleep prevents that on Mac OSX, but does not work in Windows. Looking into alternatives.
ok this works for me on Windows 10 and Mac OSX:
npm install --save-dev system-sleep
use "opener" instead of open
"delayed-open": "sleep 5 && opener http://localhost:2368",
I'll update and push out a new build.
@allabuthahir Closing this issue. Feel free to re-open if you run into any problems.
npm 'open' not recognized when using npm start - under windows 10