15

Someone could guide me to know why I can not generate a new project with the new version of angular 7

Desired result:

ng new firebase-auth ? Would you like to add Angular routing? No ? Which stylesheet format would you like to use? CSS

obtained result:

 $ ng new appAtlas
    CREATE appAtlas/angular.json (3786 bytes)
    CREATE appAtlas/package.json (1316 bytes)
    CREATE appAtlas/README.md (1025 bytes)
    CREATE appAtlas/tsconfig.json (408 bytes)
    CREATE appAtlas/tslint.json (2837 bytes)
    CREATE appAtlas/.editorconfig (245 bytes)
    CREATE appAtlas/.gitignore (503 bytes)
    CREATE appAtlas/src/favicon.ico (5430 bytes)
    ....
    CREATE appAtlas/e2e/src/app.po.ts (208 bytes)
    npm WARN deprecated [email protected]: CircularJSON is in maintenance only, fl                                   atted is its successor.

Angular cli version

$ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 7.0.5
Node: 10.13.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.10.5
@angular-devkit/core         7.0.5
@angular-devkit/schematics   7.0.5
@schematics/angular          7.0.5
@schematics/update           0.10.5
rxjs                         6.3.3
typescript                   3.1.6

Node, npm version

$ node -v
v10.13.0

$ npm --version
6.4.1
2

2 Answers 2

22

Have you tried another terminal?

I noticed I get the interactive prompts when I use Windows Command Prompt (CMD), but I don't get them in Cygwin. Even if I use ng new new_project --interactive=true, Cygwin just skips the prompts and goes with the default options similar to your screenshot.

2
  • 1
    Exactly! Same for Angular 8 & 9. Works with Windows Command Prompt.
    – robert
    Commented Feb 10, 2020 at 22:32
  • Thank you for this, the first time I did this it worked fine, but I was using powershell, and then I had git bash open and it wasn't working and I didn't realize I had switched shells.
    – FredMan
    Commented Feb 25, 2020 at 4:10
0

I had the same problem. But I found a solution for the missing questions when you wanna create a new angular project via the command line.

So, try the following steps:

  1. Look in the following file, what kind of angular-cli version is installed => C:\Users\[yourNickname]\AppData\Roaming\npm\node_modules\@angular\cli\package.json

  2. Delete the directory @angular

  3. Go to the command line and type npm cache verify

  4. Then type npm install -g @angular/cli

  5. Change to your folder where you wanna create the angular project and type ng new MyApp

Well, the questions have to display you again :)

2
  • You can do ng version to see what version of the cli you have installed...Also, you can do npm r -g @angular/cli to remove it globally...
    – Baruch
    Commented Jan 25, 2019 at 18:33
  • Yeah my problem was, I had 2 different angular cli versions. The first newest one 7.2.3 was in the path C:\Users\UserName\... and the old one with the version 1.0.0.beta was in the path C:\Users\UserName.DOMAIN\..... When I created an angular project it always took the old version from the old account. I don't know why. I did the steps in my answer and it works now.
    – yuro
    Commented Jan 25, 2019 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.