Skip to content

Creating a project with existing directory => impossible? #9655

Description

@sokraflex

Versions

ng --version: 1.7.0
npm --version: 5.0.3
node --version: v6.9.5
OS: Windows 10, 64-bit

Repro steps

  • Create a new project folder: $ mkdir test
  • Switch into the folder: $ cd test
  • Install angular-cli: $ npm install -g @angular/cli
  • Try to create a new angular project with the currenct directory: $ ng new appName --directory ./

The last step is nowhere officially documented, however, multiple GitHub-issues linked to this, including:

In lack of a documented possibility to create an angular project in an existing directory, I used the above solution.

Observed behavior

Error: Schematic input does not validate against the Schema: {"directory":"./","name":"appName","skipGit":false,"style":"css","version":"1.7.0","commit":{"message":"chore: initial commit from @angular/cli\n\n    _                      _                 ____ _     ___\n   / \\   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|\n  / △ \\ | '_ \\ / _\\` | | | | |/ _\\` | '__|   | |   | |    | |\n / ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\n/_/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\n               |___/\n","name":"Angular CLI","email":"angular-cli@angular.io"},"path":"app","sourceDir":"src","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipInstall":false,"linkCli":false,"minimal":false,"serviceWorker":false}
Errors:
  .directory should match format "path"
Schematic input does not validate against the Schema: {"directory":"./","name":"appName","skipGit":false,"style":"css","version":"1.7.0","commit":{"message":"chore: initial commit from @angular/cli\n\n    _                      _                 ____ _     ___\n   / \\   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|\n  / △ \\ | '_ \\ / _\\` | | | | |/ _\\` | '__|   | |   | |    | |\n / ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\n/_/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\n               |___/\n","name":"Angular CLI","email":"angular-cli@angular.io"},"path":"app","sourceDir":"src","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipInstall":false,"linkCli":false,"minimal":false,"serviceWorker":false}
Errors:
  .directory should match format "path"

(Yes, the command results in exactly above output - the error message is repeated twice)

Desired behavior

I would expect that angular generates files for a project in the folder, and of course no error message resulting. The files should be located directly in the "test"-folder and not be placed in a subfolder, e.g. "test/appName".

Mention any other details that might be useful (optional)

Using an absolute path instead of a relatively one (in the ng new command) does not change anything, apart from the path-contents of the error message.

Using the command like $ ng new appName --directory . (without the / in the directory path) results in the same error.

Trying to reference the directory from itself by relative path (used as possible workaround) fails with a new error message:

$ mkdir test
$ cd test
$ ng new appName --directory "../test"
Error: Path "/../test" is invalid.
Path "/../test" is invalid.

If there is any other information I might help you with, please tell me.

Workaround

The same result can be achieved by changing into the parent directory and commanding angular to create the app in the sub-directory:

$ mkdir test
$ ng new appName --directory "test"

Activity

  1. yelfeng commented on Feb 28, 2018

    @yelfeng

    I have the same issue with @aslthiago .

  2. stiofand commented on Mar 1, 2018

    @stiofand

    same as @aslthiago here in IntellijIdea

  3. shalk commented on Mar 1, 2018

    @shalk

    ng-cli version 1.7.1
    node version 8.9.4 LTS
    the same issue when i using Intelli IDEA to create angular project

    D:\bin\nodejs\node.exe C:\Users\shalk\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng new first-app --dir=. Error: Schematic input does not validate against the Schema: {"directory":".","name":"first-app","skipGit":false,"style":"css","version":"1.7.1","commit":{"message":"chore: initial commit from @angular/cli\n\n _ _ ____ _ ___\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\n / △ \\ | '_ \\ / _\\ | | | | |/ _\ | '__| | | | | | |\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\n/_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\n |___/\n","name":"Angular CLI","email":"angular-cli@angular.io"},"path":"app","sourceDir":"src","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipInstall":false,"linkCli":false,"minimal":false,"serviceWorker":false} Schematic input does not validate against the Schema: {"directory":".","name":"first-app","skipGit":false,"style":"css","version":"1.7.1","commit":{"message":"chore: initial commit from @angular/cli\n\n _ _ ____ _ ___\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\n / △ \\ | '_ \\ / _\\ | | | | |/ _\| '__| | | | | | |\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\n/_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\n |___/\n","name":"Angular CLI","email":"angular-cli@angular.io"},"path":"app","sourceDir":"src","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipInstall":false,"linkCli":false,"minimal":false,"serviceWorker":false} Errors: Errors: .directory should match format "path" .directory should match format "path" Done

  4. jacsonlinux commented on Mar 2, 2018

    @jacsonlinux

    Webstorm 2017.3.4

    Angular CLI: 1.7.2
    Node: 9.7.0
    OS: linux x64

    /usr/bin/node /usr/lib/node_modules/@angular/cli/bin/ng new untitled --dir=.
    Error: Schematic input does not validate against the Schema: {"directory":".","name":"untitled","skipGit":false,"style":"css","version":"1.7.2","commit":{"message":"chore: initial commit from @angular/cli\n\n _ _ ____ _ \n / \ _ __ __ _ _ | | __ _ _ __ / | | | |\n / △ \ | ' \ / _\ | | | | |/ _\\ | '| | | | | | |\n / ___ \| | | | (| | || | | (| | | | || |_ | |\n// \\| ||\, |\,||\,|| \____|||\n |/\n","name":"Angular CLI","email":"angular-cli@angular.io"},"path":"app","sourceDir":"src","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipInstall":false,"linkCli":false,"minimal":false,"serviceWorker":false}
    Errors:
    .directory should match format "path"
    Schematic input does not validate against the Schema: {"directory":".","name":"untitled","skipGit":false,"style":"css","version":"1.7.2","commit":{"message":"chore: initial commit from @angular/cli\n\n _ _ ____ _ \n / \ _ __ __ _ _ | | __ _ _ __ / | | | |\n / △ \ | ' \ / _\ | | | | |/ _\\ | '| | | | | | |\n / ___ \| | | | (| | || | | (| | | | |
    | |
    __ | |\n// \\| ||\, |\,||\,|| \____|||\n |___/\n","name":"Angular CLI","email":"angular-cli@angular.io"},"path":"app","sourceDir":"src","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipInstall":false,"linkCli":false,"minimal":false,"serviceWorker":false}
    Errors:
    .directory should match format "path"
    Done

  5. F0rt1s commented on Mar 2, 2018

    @F0rt1s

    Angular 6.0.0 beta 4 is also failing with this.

  6. jmussman commented on Mar 4, 2018

    @jmussman

    SargTeX: You labeled this issue as a feature request, but it's definitely a bug. Or a feature that someone thought we needed, but is impeding a significant number of people. Can you relabel as a bug, and maybe freq:high so that someone will notice and address it?

  7. prigara commented on Mar 5, 2018

    @prigara

    Hi @clydin, @Brocco, @hansl!
    As @denofevil has already mentioned in his comment, due to the path validation issue it is now impossible to create a new Angular project in WebStorm and other JetBrains IDEs using Angular CLI 1.7.0. The IDE creates a project directory first and only then runs angular-cli in it – that is something we can’t easily change.
    What can be done to solve the issue?
    We really hope that it would be possible again to create Angular projects in WebStorm.
    Thanks!

  8. darrenmothersele commented on Mar 8, 2018

    @darrenmothersele

    I've upgrade from Angular CLI 1.6.8 to Angular CLI: 1.7.3 this morning.
    I can no longer create projects, in WebStorm, using this in the terminal: ng new --minimal --directory=. exampleapp
    same error as #issuecomment-369788392 above

  9. darrenmothersele commented on Mar 9, 2018

    @darrenmothersele

    A work around to use the Angular CLI to generate projects in WebStorm (and other JetBrains IDEs) is to create an empty project, open terminal and cd to parent directory, then run

    ng new --directory=DIR_NAME example
    

    where DIR_NAME is the project you created, then cd back into the folder and continue to use WebStorm as usual.

  10. jmussman commented on Mar 9, 2018

    @jmussman

    That isn't a solution if you cannot install the command globally, and in a lot of locked-down development environments you can't. Besides, there are a lot of other good reasons you should not install it globally. When the instructions tell you to do so, they are assuming that you only want one version of the command on your computer, and that does not happen in large organizations.

  11. darrenmothersele commented on Mar 9, 2018

    @darrenmothersele

    @jmussman I don't think the bug being reported here (inability to use --directory=.) is dependent on if you have ng installing globally or not. So my advice converts to however you're running the ng new command without installing globally.

  12. jmussman commented on Mar 9, 2018

    @jmussman
  13. ratracegrad commented on May 6, 2018

    @ratracegrad

    ng --version: 6.0.0
    npm --version: 5.6.0
    node --version: v8.11.1
    OS: Mac OS High Sierra 10.13.4, 64-bit

    Repro steps

    npm install -g @angular/cli
    ng new ng-md-01
    

    Observed behavior

    Schematic input does not validate against the Schema: {"name":"ng-md-01","version":"6.0.0","newProjectRoot":"projects","skipInstall":false,"linkCli":false,"skipGit":false,"commit":null}
    Errors:

    Data path ".name" should match format "html-selector".

    Desired behavior

    Angular CLI should have created the directory ng-md-01 and then template out a new application.

    #Also failed with this command

    ng new md-01
    

    Able to succeed with this

    ng new md-intro

    Possible problem

    The use of numbers in name of application??

  14. nalangekrushna commented on May 25, 2018

    @nalangekrushna

    seems like downgrading to 1.6.8 is solution for now
    use this commnads to do this.

    npm uninstall -g @angular/cli
    npm cache clean --force
    npm install -g @angular/cli@1.6.8

  15. maungnthan commented on Jun 16, 2018

    @maungnthan

    Do not use any number in the application name.

    ng new latest-app (This works fine)

    ng new 60-app (This will fail with below error)

    Schematic input does not validate against the Schema: {"name":"60-app","version":"6.0.8","newProjectRoot":"projects","skipInstall":false,"linkCli":false,"skipGit":false,"commit":null}
    Errors:

    Data path ".name" should match format "html-selector".

  16. kay17 commented on Jun 19, 2018

    @kay17

    I could resolve the error by changing
    ng new test_essentials
    to
    ng new essentials
    Apart from numbers in the name, apparently an underscore is not accepted either

  17. NDMCreative commented on Jul 17, 2018

    @NDMCreative

    ng new does not like the underscore " _ " so test_essentials should be put down as testEssentials

  18. arledesma commented on Jul 31, 2018

    @arledesma

    This functionality is also hit and miss across all 6.x versions

    Tested with the following:

    npm show @angular/cli@6.* version | \
    while read pkg version;
    do
      echo npm install -g ${pkg};
      echo ng --version;
      v=$(echo ${version} | awk -F\' '{ gsub(/\./,""); print $2; }');
      app="ngCli${v}";
      echo mkdir -p ${app};
      echo pushd ${app};
      echo ng new \"${app}\" --directory=\"./\"  -d;
      echo popd;
      echo echo $(printf "%0.s-" {1..25});
      echo echo;
    done | bash -x
    version works
    6.0.0 ✘
    6.0.1 ✘
    6.0.2 ✔
    6.0.3 ✔
    6.0.4 ✘
    6.0.5 ✔
    6.0.7 ✔
    6.0.8 ✔
    6.1.0 ✘
    6.1.1 ✘

    versions and output

    • 6.0.0
      • Angular CLI: 6.0.0
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.6.0
    @angular-devkit/core 0.6.0
    @angular-devkit/schematics 0.6.0
    @schematics/angular 0.6.0
    @schematics/update 0.6.0
    rxjs 6.2.2
    typescript 2.7.2

    output:

      $ ng new ngCli600 --directory=./ -d
      Schematic input does not validate against the Schema: {"dryRun":true,"directory":"./","skipGit":true,"version":"6.0.0","skipInstall":false,"linkCli":false,"commit":true,"newProjectRoot":"projects","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","style":"css","skipTests":false}
      Errors:
    
        Data path ".directory" should match format "path".
    • 6.0.1
      • Angular CLI: 6.0.1
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.6.1
    @angular-devkit/core 0.6.1
    @angular-devkit/schematics 0.6.1
    @schematics/angular 0.6.1
    @schematics/update 0.6.1
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli601 --directory=./ -d
    Schematic input does not validate against the Schema: {"dryRun":true,"directory":"./","skipGit":true,"version":"6.0.1","skipInstall":false,"linkCli":false,"commit":true,"newProjectRoot":"projects","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","style":"css","skipTests":false}
    Errors:
    
      Data path ".directory" should match format "path".
    • 6.0.2
      • Angular CLI: 6.0.2
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.6.2
    @angular-devkit/core 0.6.2
    @angular-devkit/schematics 0.6.2
    @schematics/angular 0.6.2
    @schematics/update 0.6.2
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli602 --directory=./ -d
    CREATE README.md (1025 bytes)
    CREATE angular.json (3420 bytes)
    CREATE package.json (1313 bytes)
    CREATE tsconfig.json (384 bytes)
    CREATE tslint.json (2805 bytes)
    CREATE .editorconfig (245 bytes)
    CREATE .gitignore (503 bytes)
    CREATE src/environments/environment.prod.ts (51 bytes)
    CREATE src/environments/environment.ts (631 bytes)
    CREATE src/favicon.ico (5430 bytes)
    CREATE src/index.html (295 bytes)
    CREATE src/main.ts (370 bytes)
    CREATE src/polyfills.ts (3194 bytes)
    CREATE src/test.ts (642 bytes)
    CREATE src/assets/.gitkeep (0 bytes)
    CREATE src/styles.css (80 bytes)
    CREATE src/browserslist (375 bytes)
    CREATE src/karma.conf.js (964 bytes)
    CREATE src/tsconfig.app.json (194 bytes)
    CREATE src/tsconfig.spec.json (282 bytes)
    CREATE src/tslint.json (314 bytes)
    CREATE src/app/app.module.ts (314 bytes)
    CREATE src/app/app.component.css (0 bytes)
    CREATE src/app/app.component.html (1141 bytes)
    CREATE src/app/app.component.spec.ts (986 bytes)
    CREATE src/app/app.component.ts (207 bytes)
    CREATE e2e/protractor.conf.js (752 bytes)
    CREATE e2e/src/app.e2e-spec.ts (299 bytes)
    CREATE e2e/src/app.po.ts (208 bytes)
    CREATE e2e/tsconfig.e2e.json (213 bytes)
    
    NOTE: Run with "dry run" no changes were made.
    • 6.0.3
      • Angular CLI: 6.0.3
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.6.3
    @angular-devkit/core 0.6.3
    @angular-devkit/schematics 0.6.3
    @schematics/angular 0.6.3
    @schematics/update 0.6.3
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli603 --directory=./ -d
    CREATE README.md (1025 bytes)
    CREATE angular.json (3420 bytes)
    CREATE package.json (1313 bytes)
    CREATE tsconfig.json (384 bytes)
    CREATE tslint.json (2805 bytes)
    CREATE .editorconfig (245 bytes)
    CREATE .gitignore (503 bytes)
    CREATE src/environments/environment.prod.ts (51 bytes)
    CREATE src/environments/environment.ts (631 bytes)
    CREATE src/favicon.ico (5430 bytes)
    CREATE src/index.html (295 bytes)
    CREATE src/main.ts (370 bytes)
    CREATE src/polyfills.ts (3194 bytes)
    CREATE src/test.ts (642 bytes)
    CREATE src/assets/.gitkeep (0 bytes)
    CREATE src/styles.css (80 bytes)
    CREATE src/browserslist (375 bytes)
    CREATE src/karma.conf.js (964 bytes)
    CREATE src/tsconfig.app.json (194 bytes)
    CREATE src/tsconfig.spec.json (282 bytes)
    CREATE src/tslint.json (314 bytes)
    CREATE src/app/app.module.ts (314 bytes)
    CREATE src/app/app.component.css (0 bytes)
    CREATE src/app/app.component.html (1141 bytes)
    CREATE src/app/app.component.spec.ts (991 bytes)
    CREATE src/app/app.component.ts (207 bytes)
    CREATE e2e/protractor.conf.js (752 bytes)
    CREATE e2e/src/app.e2e-spec.ts (299 bytes)
    CREATE e2e/src/app.po.ts (208 bytes)
    CREATE e2e/tsconfig.e2e.json (213 bytes)
    
    NOTE: Run with "dry run" no changes were made.
    • 6.0.4
      • Angular CLI: 6.0.4
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.6.4
    @angular-devkit/core 0.6.4
    @angular-devkit/schematics 0.6.4
    @schematics/angular 0.6.4
    @schematics/update 0.6.4
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli604 --directory=./ -d
    Schematic input does not validate against the Schema: {"dryRun":true,"directory":"./","skipGit":true,"version":"6.0.4","skipInstall":false,"linkCli":false,"commit":true,"newProjectRoot":"projects","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","style":"css","skipTests":false}
    Errors:
    
      Data path "" should NOT have additional properties(dryRun).
    • 6.0.5
      • Angular CLI: 6.0.5
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.6.5
    @angular-devkit/core 0.6.5
    @angular-devkit/schematics 0.6.5
    @schematics/angular 0.6.5
    @schematics/update 0.6.5
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli605 --directory=./ -d
    CREATE README.md (1025 bytes)
    CREATE angular.json (3420 bytes)
    CREATE package.json (1313 bytes)
    CREATE tsconfig.json (384 bytes)
    CREATE tslint.json (2805 bytes)
    CREATE .editorconfig (245 bytes)
    CREATE .gitignore (503 bytes)
    CREATE src/environments/environment.prod.ts (51 bytes)
    CREATE src/environments/environment.ts (631 bytes)
    CREATE src/favicon.ico (5430 bytes)
    CREATE src/index.html (295 bytes)
    CREATE src/main.ts (370 bytes)
    CREATE src/polyfills.ts (3194 bytes)
    CREATE src/test.ts (642 bytes)
    CREATE src/assets/.gitkeep (0 bytes)
    CREATE src/styles.css (80 bytes)
    CREATE src/browserslist (375 bytes)
    CREATE src/karma.conf.js (964 bytes)
    CREATE src/tsconfig.app.json (194 bytes)
    CREATE src/tsconfig.spec.json (282 bytes)
    CREATE src/tslint.json (314 bytes)
    CREATE src/app/app.module.ts (314 bytes)
    CREATE src/app/app.component.css (0 bytes)
    CREATE src/app/app.component.html (1141 bytes)
    CREATE src/app/app.component.spec.ts (991 bytes)
    CREATE src/app/app.component.ts (207 bytes)
    CREATE e2e/protractor.conf.js (752 bytes)
    CREATE e2e/src/app.e2e-spec.ts (299 bytes)
    CREATE e2e/src/app.po.ts (208 bytes)
    CREATE e2e/tsconfig.e2e.json (213 bytes)
    
    NOTE: Run with "dry run" no changes were made.
    • 6.0.7
      • Angular CLI: 6.0.7
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.6.7
    @angular-devkit/core 0.6.7
    @angular-devkit/schematics 0.6.7
    @schematics/angular 0.6.7
    @schematics/update 0.6.7
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli607 --directory=./ -d
    CREATE README.md (1025 bytes)
    CREATE angular.json (3566 bytes)
    CREATE package.json (1313 bytes)
    CREATE tsconfig.json (384 bytes)
    CREATE tslint.json (2805 bytes)
    CREATE .editorconfig (245 bytes)
    CREATE .gitignore (503 bytes)
    CREATE src/environments/environment.prod.ts (51 bytes)
    CREATE src/environments/environment.ts (631 bytes)
    CREATE src/favicon.ico (5430 bytes)
    CREATE src/index.html (295 bytes)
    CREATE src/main.ts (370 bytes)
    CREATE src/polyfills.ts (3194 bytes)
    CREATE src/test.ts (642 bytes)
    CREATE src/assets/.gitkeep (0 bytes)
    CREATE src/styles.css (80 bytes)
    CREATE src/browserslist (375 bytes)
    CREATE src/karma.conf.js (964 bytes)
    CREATE src/tsconfig.app.json (194 bytes)
    CREATE src/tsconfig.spec.json (282 bytes)
    CREATE src/tslint.json (314 bytes)
    CREATE src/app/app.module.ts (314 bytes)
    CREATE src/app/app.component.css (0 bytes)
    CREATE src/app/app.component.html (1141 bytes)
    CREATE src/app/app.component.spec.ts (991 bytes)
    CREATE src/app/app.component.ts (207 bytes)
    CREATE e2e/protractor.conf.js (752 bytes)
    CREATE e2e/src/app.e2e-spec.ts (304 bytes)
    CREATE e2e/src/app.po.ts (208 bytes)
    CREATE e2e/tsconfig.e2e.json (213 bytes)
    
    NOTE: Run with "dry run" no changes were made.
    • 6.0.8
      • Angular CLI: 6.0.8
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.6.8
    @angular-devkit/core 0.6.8
    @angular-devkit/schematics 0.6.8
    @schematics/angular 0.6.8
    @schematics/update 0.6.8
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli608 --directory=./ -d
    CREATE README.md (1025 bytes)
    CREATE angular.json (3566 bytes)
    CREATE package.json (1313 bytes)
    CREATE tsconfig.json (384 bytes)
    CREATE tslint.json (2805 bytes)
    CREATE .editorconfig (245 bytes)
    CREATE .gitignore (503 bytes)
    CREATE src/environments/environment.prod.ts (51 bytes)
    CREATE src/environments/environment.ts (631 bytes)
    CREATE src/favicon.ico (5430 bytes)
    CREATE src/index.html (295 bytes)
    CREATE src/main.ts (370 bytes)
    CREATE src/polyfills.ts (3194 bytes)
    CREATE src/test.ts (642 bytes)
    CREATE src/assets/.gitkeep (0 bytes)
    CREATE src/styles.css (80 bytes)
    CREATE src/browserslist (375 bytes)
    CREATE src/karma.conf.js (964 bytes)
    CREATE src/tsconfig.app.json (194 bytes)
    CREATE src/tsconfig.spec.json (282 bytes)
    CREATE src/tslint.json (314 bytes)
    CREATE src/app/app.module.ts (314 bytes)
    CREATE src/app/app.component.css (0 bytes)
    CREATE src/app/app.component.html (1141 bytes)
    CREATE src/app/app.component.spec.ts (991 bytes)
    CREATE src/app/app.component.ts (207 bytes)
    CREATE e2e/protractor.conf.js (752 bytes)
    CREATE e2e/src/app.e2e-spec.ts (304 bytes)
    CREATE e2e/src/app.po.ts (208 bytes)
    CREATE e2e/tsconfig.e2e.json (213 bytes)
    
    NOTE: Run with "dry run" no changes were made.
    • 6.1.0
      • Angular CLI: 6.1.0
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.7.0
    @angular-devkit/core 0.7.0
    @angular-devkit/schematics 0.7.0
    @schematics/angular 0.7.0
    @schematics/update 0.7.0
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli610 --directory=./ -d
    Path "/README.md" already exist.
    • 6.1.1
      • Angular CLI: 6.1.1
      • Node: 8.11.3
      • OS: linux x64
      • Angular:
    Package Version
    @angular-devkit/architect 0.7.1
    @angular-devkit/core 0.7.1
    @angular-devkit/schematics 0.7.1
    @schematics/angular 0.7.1
    @schematics/update 0.7.1
    rxjs 6.2.2
    typescript 2.7.2

    output:

    $ ng new ngCli611 --directory=./ -d
    Path "/README.md" already exist.
  19. HASSAANALVI20 commented on Aug 14, 2018

    @HASSAANALVI20

    1
    please help angular 5 project not create using ng new myapp .project stop successfully initialized git

  20. added this to the Backlog milestone on Jan 24, 2019
  21. added
    feature: under considerationFeature request for which voting has completed and the request is now under consideration
    on Feb 1, 2022
  22. modified the milestones: Backlog, needsTriage on Feb 1, 2022
  23. Parth7030 commented on Nov 28, 2022

    @Parth7030

    With Latest angular version I guess from V12 you can use:
    ng generate application <name> [options]

  24. alan-agius4 commented on Aug 28, 2026

    @alan-agius4
    Collaborator

    Thanks for reporting this issue. Please update to the most recent version to resolve the problem.

    If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use ng new repro-app to create a new project where you reproduce the problem.

  25. angular-automatic-lock-bot commented on Oct 20, 2026

    @angular-automatic-lock-bot

    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.

  26. locked and limited conversation to collaborators on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @schematics/angularfeatureLabel used to distinguish feature request from other issuesfeature: under considerationFeature request for which voting has completed and the request is now under consideration

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions