Angular-cli: ng serve is not working

Created on 14 Jul 2016  路  4Comments  路  Source: angular/angular-cli

ng serve is not working, Please help me to resolve this

  1. Window 8.1
  2. angular-cli: 1.0.0-beta.9
    node: 4.4.7
    os: win32 x64
  3. I have run the following commands
    $npm install -g angular-cli
    $ng new myapp
    $cd myapp
    $ng serve
  4. angular-cli successfully installed.

serveerror

Most helpful comment

In my case, if I do "npm install" again after "cd myapp" it will work.
Also, I usually update all @angular in package.json to "rc.4" and router to beta.2.
I thought I've seen this in an issue before, but I can't find it. Hopefully this will be fixed soon, so you don't have to "npm install" right after you've already waited 10 minutes for the CLI to finish.

All 4 comments

In my case, if I do "npm install" again after "cd myapp" it will work.
Also, I usually update all @angular in package.json to "rc.4" and router to beta.2.
I thought I've seen this in an issue before, but I can't find it. Hopefully this will be fixed soon, so you don't have to "npm install" right after you've already waited 10 minutes for the CLI to finish.

It seems like there was a bug when creating the app that skipped the npm install step. Could you try with the latest beta (beta.10) and see if that fixes it? I cannot seem to be able to reproduce locally. Thanks.

I was also facing this but not its resolved:
Put this line in package.json for start:

"start": "ng serve --host 0.0.0.0 --port 4201"

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._

Was this page helpful?
0 / 5 - 0 ratings