Skip to content

Angular CLI 12.2.0 fails "ng add" with "Command aborted." without confirmation prompt #21512

@daiplusplus

Description

@daiplusplus

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Did this behavior use to work in the previous version?

Yes

Yes, the previous version in which this bug was not present was: ....

v11 (I haven't used other v12.x versions)

Description and 🔬 Minimal Reproduction

  • Running ng add always fails with "Command abort.ed" unless I add --skip-confirmation.
  • Additionally, there is no difference in output with or without --verbose.

For example:

$ cd ~

$ mkdir test

$ cd test

$ npm install -g @angular/cli
# etc

$ ng add @angular-eslint/schematics@12.2.0
- Determining package manager...
i Using package manager: npm
- Loading package information from registry...
√ Package information loaded.
Command aborted.

$ ng add @angular-eslint/schematics --skip-confirmation
- Determining package manager...
i Using package manager: npm
- Searching for compatible package version...
√ Found compatible package version: @angular-eslint/schematics@12.3.1.
- Loading package information from registry...
√ Package information loaded.
- Installing package...
√ Package successfully installed.

    All @angular-eslint dependencies have been successfully installed 🎉

    Please see https://github.com/angular-eslint/angular-eslint for how to add ESLint configuration to your project.


    We detected that you have a single project in your workspace and no existing linter wired up, so we are configuring ESLint for you automatically.

    Please see https://github.com/angular-eslint/angular-eslint for more information.

CREATE .eslintrc.json (984 bytes)
UPDATE package.json (1445 bytes)
UPDATE angular.json (3333 bytes)
- Installing packages (npm)...
√ Packages installed successfully.

🌍 Your Environment


$ node --version
v14.17.4

$ npm --version
7.20.3

$ ng version

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


Angular CLI: 12.2.0
Node: 14.17.4
Package Manager: npm 7.20.3
OS: win32 x64

Angular: 12.2.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.0
@angular-devkit/build-angular   12.2.0
@angular-devkit/core            12.2.0
@angular-devkit/schematics      12.2.0
@schematics/angular             12.2.0
rxjs                            6.6.7
typescript                      4.3.5

Anything else relevant?

  • Windows 10 x64
  • Using git-bash as my shell in a mintty window.

I fiddled with add-impl.js to see why it wasn't prompting and I think the problem is add-impl.js has if( !tty_1.isTTY ) { but prompt.js has if (!tty_1.isTTY()) {, so is isTTY a function or a getter-property?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions