question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

🐞 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?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
alan-agius4commented, Aug 5, 2021

@Jehoel, the mentioned shell script is actually generated by NPM and not Angular. Hence we have no controller of its contents.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 12, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'ng add @angular/material' produces error, why?
I am on angular CLI version 8.0.3 and same for devkit/core and devkit/schematics. I am completely sure I am running the command in...
Read more >
ng add - Angular
Option Description Value Type Default Value ‑‑force Force overwriting of existing files. boolean false ‑‑interactive Enable interactive input prompts. boolean true ‑‑registry The NPM registry to...
Read more >
@angular/cli | Yarn - Package Manager
The Angular CLI is a command-line interface tool that you use to ... ccc8e0350, fix, display actionable error when a style does not...
Read more >
How To Install Angular CLI - KnowledgeHut
Enter this command into the Windows Command Prompt to install Angular CLI. npm install –g @angular/cli. Verify the configured version after you'Β ...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... --update fails with error message" status:RESOLVED resolution:OBSOLETE ... Bug:92113 - "plz add ebuild for Kat - Desktop Search Engine for Linux"Β ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found