Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Angular: @nxext/ionic-angular:page not working as expected #21

Open
@m0wglii

Description

Describe the bug

I have set up an nx workspace as monorepo for creating mobile apps with angular and ionic. I am using the nx generate ui to generate applications and/or pages within applications. Since the generator for applications is working fine, I am not able to generate a page using the generator.

PS D:\dev\ionic\ionic-mono> D:/dev/ionic/ionic-mono/node_modules/.bin/nx.cmd g @nxext/ionic-angular:page --name=login --project=apps-demo-app --no-interactive --verbose

>  NX  Generating @nxext/ionic-angular:page


 >  NX   Cannot read properties of undefined (reading 'parent')


TypeError: Cannot read properties of undefined (reading 'parent')
    at traverse (D:\dev\ionic\ionic-mono\node_modules\@phenomnomnominal\tsquery\dist\src\traverse.js:45:38)
    at traverseChildren (D:\dev\ionic\ionic-mono\node_modules\@phenomnomnominal\tsquery\dist\src\traverse.js:30:5)
    at match (D:\dev\ionic\ionic-mono\node_modules\@phenomnomnominal\tsquery\dist\src\match.js:12:37)
    at query (D:\dev\ionic\ionic-mono\node_modules\@phenomnomnominal\tsquery\dist\src\query.js:12:30)
    at Function.replace (D:\dev\ionic\ionic-mono\node_modules\@phenomnomnominal\tsquery\dist\src\replace.js:8:37)
    at updateAppRoutingModule (D:\dev\ionic\ionic-mono\node_modules\@nxext\ionic-angular\src\generators\page\lib\update-routing-file.js:14:47)
    at D:\dev\ionic\ionic-mono\node_modules\@nxext\ionic-angular\src\generators\page\generator.js:29:58
    at Generator.next (<anonymous>)
    at fulfilled (D:\dev\ionic\ionic-mono\node_modules\tslib\tslib.js:166:62)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Expected behavior
The command should run successfully and generate a page within my application.

Additional context

PS D:\dev\ionic\ionic-mono> nx report

 >  NX   Report complete - copy this into the issue template

   Node   : 18.18.0
   OS     : win32-x64
   npm    : 9.8.1
   
   nx (global)        : 17.0.2
   nx                 : 17.1.3
   @nx/js             : 17.1.3
   @nx/jest           : 17.1.3
   @nx/linter         : 17.1.3
   @nx/eslint         : 17.1.3
   @nx/workspace      : 17.1.3
   @nx/angular        : 17.1.3
   @nx/cypress        : 17.1.3
   @nx/devkit         : 17.1.3
   @nx/eslint-plugin  : 17.1.3
   @nrwl/tao          : 17.1.3
   @nx/web            : 17.1.3
   @nx/webpack        : 17.1.3
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   @ionic/angular       : 7.5.2
   @nxext/capacitor     : 17.0.1
   @nxext/ionic-angular : 17.0.1

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions