generator-gulp-angular
generator-gulp-angular copied to clipboard
How can I change this behaviour to launch Chrome instead of IE with npm start?
I am trying to build an Angular 2 application using VSCode editor. On my machine the default browser is IE. When I run npm start it launches the application in IE. But I want to launch my application in Chrome.How can I change this behaviour to launch Chrome instead of IE with npm start?
try this https://support.google.com/chrome/answer/95417?hl=en&co=GENIE.Platform%3DDesktop
It worked for me
I'm a little late to the party, but possibly this post post will help you. If the link ever breaks, it deals with injecting BROWSER='Chrome' into your start string (per the post, 'Google Chrome' did not work for me).
As an example, for my application I had the below which always opened in IE (work computer, can't change the default browser):
"scripts": { "start": "cross-env PORT=8080 react-scripts start" }
...and I changed to:
"scripts": { "start": "cross-env PORT=8080 BROWSER='Chrome' react-scripts start" }
...and here's why BROWSER='Google Chrome' did not work for me (I'm on a Windows system).
I found this thread, in my case I was trying to run npm Start from a CLI as administrator. When I went back to a regular CLI (not administrator) it launches from Chrome, which is good enough for what I needed.
You See THis video solve your problem https://www.youtube.com/watch?v=m-MzAA0TOvA&t=232s