GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Generate component does not add automatically to module · Issue #2379 · NativeScript/nativescript-angular

Generate component does not add automatically to module #2379

New issue
Copy link
New issue
Copy link
Open
Open
Generate component does not add automatically to module#2379
Copy link

Description

@danouche93
danouche93
opened on May 25, 2022
Issue body actions

Environment

{
  "name": "TinaAppV2",
  "main": "./src/main.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "~13.2.0",
    "@angular/common": "~13.2.0",
    "@angular/compiler": "~13.2.0",
    "@angular/core": "~13.2.0",
    "@angular/forms": "~13.2.0",
    "@angular/platform-browser": "~13.2.0",
    "@angular/platform-browser-dynamic": "~13.2.0",
    "@angular/router": "~13.2.0",
    "@nativescript/angular": "^13.0.0",
    "@nativescript/core": "~8.2.2",
    "@nativescript/firebase": "^11.1.2",
    "@nativescript/firebase-core": "^1.0.0-alpha.36",
    "@nativescript/firebase-crashlytics": "^1.0.0-alpha.36",
    "@nativescript/firebase-database": "^1.0.0-alpha.36",
    "@nativescript/firebase-messaging": "^1.0.0-alpha.36",
    "@nativescript/mlkit-barcode-scanning": "^1.0.0-alpha.8",
    "@nativescript/mlkit-core": "^1.0.0-alpha.8",
    "@nativescript/theme": "~3.0.2",
    "@nstudio/nativescript-loading-indicator": "^4.1.2",
    "@nstudio/nativescript-pulltorefresh": "^3.0.2",
    "nativescript-ui-listview": "^10.1.1",
    "rxjs": "~7.5.0",
    "zone.js": "~0.11.5"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~13.2.0",
    "@angular/cli": "^13.3.6",
    "@angular/compiler-cli": "~13.2.0",
    "@nativescript/android": "8.2.2",
    "@nativescript/schematics": "^11.2.0",
    "@nativescript/types": "~8.2.0",
    "@nativescript/webpack": "~5.0.6",
    "@ngtools/webpack": "~13.2.0",
    "typescript": "~4.5.5"
  }
}

Nativescript : 8.2.3
Angular CLI: 10.1.1
Angular: 13.2.7

Describe the bug
When creating a new component using the command ng g c component-name, the component is successfully created but it is not added to app.module.ts. I always have to add the component in the module manually. I didn't have that problem with nativescript 6

To Reproduce
The commands I have tried :
ng generate component component-name
ng g c component-name
ng g c component-name --m app.module.ts
ng g c app.module.ts/component-name
ng g component component-name --module=app.module.ts
ng g c component-name -m app.module.ts
None of those commands add the component in the app.module after creating it

Expected behavior
The component is created and automatically added to declarations in app.module

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.