Skip to content
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 opened this issue Nov 24, 2023 · 7 comments
Open

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

m0wglii opened this issue Nov 24, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@m0wglii
Copy link

m0wglii commented Nov 24, 2023

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
@m0wglii m0wglii added the bug Something isn't working label Nov 24, 2023
@m0wglii m0wglii changed the title Angular: @nxext/ionic-angular:page broken? Angular: @nxext/ionic-angular:page not working as expected Nov 24, 2023
@a1phaZ
Copy link

a1phaZ commented Apr 12, 2024

hi, I faced the same problem. Is there any solution?

@m0wglii
Copy link
Author

m0wglii commented Apr 12, 2024

I did not found any solution yet :(

@m8xp0w3r
Copy link

Hi. Faced the same problem. Somebody found a solution?

@DominikPieper
Copy link
Member

I rework some parts of the plugin right now. Hopefilly it will be fixed after that

@m8xp0w3r
Copy link

m8xp0w3r commented Apr 18, 2024

@DominikPieper I faced the same issue when running nx serve with the ionic-angular project later. I bypassed the page generation issue by generating an angular component instead of an ionic page and renamed it to page.

@AndriiNeverov
Copy link

@m8xp0w3r Just tried with the latest and the following worked fine: nx g page -p mobile-app --directory=pages page1.

@KarpovVolodymyr
Copy link

@AndriiNeverov Hi! Could you please tell what version of Nx and @nxext/ionic-angular do you use?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants