Skip to content

ng g @angular/core:standalone throws for empty component templates #48846

Closed

Description

@cexbrayat

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

ng g @angular/core:standalone --mode convert-to-standalone --path ./ throws if a template is empty.

ng new standalone-migration --defaults
cd standalone-migration
ng update @angular/core@next @angular/cli@next --force
echo -n > src/app/app.component.html
ng g @angular/core:standalone --mode convert-to-standalone --path ./

throws:

HostResourceLoader: loader(/Users/cedric/Code/temp/standalone-migration/src/app/app.component.html) returned a Promise

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 15.2.0-next.1
Node: 16.17.0
Package Manager: npm 8.19.3
OS: darwin arm64

Angular: 15.2.0-next.2
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1502.0-next.1
@angular-devkit/build-angular   15.2.0-next.1
@angular-devkit/core            15.2.0-next.1
@angular-devkit/schematics      15.2.0-next.1
@angular/cli                    15.2.0-next.1
@schematics/angular             15.2.0-next.1
rxjs                            7.6.0
typescript                      4.8.4

Anything else?

No response

Activity

  1. jessicajaniuk commented on Jan 25, 2023

    @jessicajaniuk
    Contributor

    I believe the migration code is missing a step yet, which will come in a PR soon. Only parts of it are present right now.

  2. added
    area: core
    on Jan 25, 2023
  3. added this to the needsTriage milestone on Jan 25, 2023
  4. self-assigned this
    on Jan 26, 2023
  5. added a commit that references this issue on Jan 26, 2023
    af31f98
  6. added a commit that references this issue on Feb 1, 2023
    79f5f9e
  7. angular-automatic-lock-bot commented on Feb 26, 2023

    @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.

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

Metadata

Metadata

Assignees

Labels

area: corestate: has PR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions