angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

CLI does not start browser on port 4200 with active reload

Open peterheard01 opened this issue 10 years ago • 8 comments

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

OSX Yosimite

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.19-3
node: 6.9.1
os: darwin x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

All of it was cli.

The log given by the failure.

Normally this include a stack trace and some more information.

EHEARD-M-N20B:my-dream-app peteheard$ n6076ms building modules                   2ms add01675ms1320ms asset41ms emittingHash: 28ce1f0add2ae1d07014                                                                                               
Version: webpack 2.1.0-beta.25
Time: 9685ms
           Asset       Size  Chunks             Chunk Names
  main.bundle.js    2.71 MB    0, 2  [emitted]  main
styles.bundle.js    10.2 kB    1, 2  [emitted]  styles
       inline.js    5.53 kB       2  [emitted]  inline
        main.map    2.81 MB    0, 2  [emitted]  main
      styles.map    14.1 kB    1, 2  [emitted]  styles
      inline.map    5.59 kB       2  [emitted]  inline
      index.html  477 bytes          [emitted]  
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  2.81 kB       0       
webpack: bundle is now VALID.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

peterheard01 avatar Nov 10 '16 08:11 peterheard01

The ng serve command does not open the browser by default. You need to add the argument -open to it, like ng serve -open.

Cheers,

Meligy avatar Nov 10 '16 09:11 Meligy

Ok great, but the documentation doesn't say this...

Should I update it?

peterheard01 avatar Nov 11 '16 07:11 peterheard01

Oh. That document is very outdated!

It doesn't even have the serve command!

Might be a good idea to remove it, redirect to readme or something. // CC @filipesilva

Meligy avatar Nov 11 '16 10:11 Meligy

An outdated doc file is a separate issue from what this issue is though.

Meligy avatar Nov 11 '16 10:11 Meligy

Do I have to make a new issue or can I rename this one then?

What does //CC @filipesilva mean?

peterheard01 avatar Nov 11 '16 15:11 peterheard01

It's like a "mention" in twitter/facebook :)

Since he hasn't replied anyway, I expect it'll be a bit until there's talks about it. Maybe close this issue and create another one, linking to this issue for context.

Thanks a lot man!

Meligy avatar Nov 11 '16 19:11 Meligy

"start": "ng serve -open" or "start": "ng serve -opn" opens the browser before the compilation is done and moreover, it opens an empty browser window. Does anyone have a precise solution?

dilipkosuri avatar Feb 20 '18 04:02 dilipkosuri

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.