Skip to content

Angular CLI 12.x silently fails serving, testing, and building older Angular projects. #21322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 of 15 tasks
EvanCarroll opened this issue Jul 9, 2021 · 4 comments · Fixed by #21331
Closed
3 of 15 tasks
Labels
Milestone

Comments

@EvanCarroll
Copy link
Contributor

EvanCarroll commented Jul 9, 2021

🐞 Bug report

If you create a project with angular-cli v11, and then upgrade angular-cli v12, you'll no longer be able to run numerous subcommands on the project. Those subcommands will silently fail and exit.

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?

Yes.

Description

Applications created with Angular 11.x will not build with angular-cli 12.x

🔬 Minimal Reproduction

npm install -g @angular-cli@11
ng new foobar --skip-install
cd foobar;

edit your package.json, to upgrade your @angular/cli to 12.

"@angular/cli": "~12",

Then run npm install

Now many of the ng commands will silently fail.

ng build
ng serve
ng test

🔥 Exception or Error

I would expect desire either,

  • It works
  • Or, an error is produced that notifies the user that @angular/cli version 12.x does not support projects created with @anguilar 11.x

🌍 Your Environment


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

Angular CLI: 12.1.1
Node: 14.17.3
Package Manager: npm 6.14.13
OS: linux x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.14
@angular-devkit/build-angular   0.1102.14
@angular-devkit/core            11.2.14
@angular-devkit/schematics      12.1.1
@angular/cli                    12.1.1
@schematics/angular             12.1.1
rxjs                            6.6.7
typescript                      4.1.6
@EvanCarroll EvanCarroll changed the title Angular CLI 12.x silently fails serving and building older Angular projects. Angular CLI 12.x silently fails serving, testing, and building older Angular projects. Jul 9, 2021
@alan-agius4
Copy link
Collaborator

Updating the dependency directly in your package.json is guaranteed to cause undefined or broken behaviour.

To update please follow the steps in https://update.angular.io/

@EvanCarroll
Copy link
Contributor Author

@alan-agius4 sure, but that seems like something ng can/should warn about.

@rajjaiswalsaumya
Copy link

I used ng update to update my dependencies, I also see similar behavior.

@alan-agius4 alan-agius4 added area: @angular-devkit/build-angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken labels Jul 12, 2021
@ngbot ngbot bot modified the milestone: needsTriage Jul 12, 2021
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jul 12, 2021
filipesilva pushed a commit that referenced this issue Jul 12, 2021
The logger API writes logs in an async fasion which previously caused messages not to be printed in the terminal when `process.exit` was invoked.

Closes #21322
filipesilva pushed a commit that referenced this issue Jul 12, 2021
The logger API writes logs in an async fasion which previously caused messages not to be printed in the terminal when `process.exit` was invoked.

Closes #21322

(cherry picked from commit 2ac8e9c)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants