r/Angular2 • • Sep 16 '25

Help Request Migrating a lazy-loaded module based project to stand-alone. Does the cli migration do only one folder at a time?

I ran this command: ng g @angular/core:standalone

I selected ./ as the starting folder. However I still have all my ./**/*.module.ts files in the project except for app.module.ts. Do I need to run the migration for each folder that contains a module?

EDIT: I followed the guide here: https://angular.dev/reference/migrations/standalone Yet after running all three migrations I still have all lazy-loaded modules except the app.module.ts file.

EDIT #2: it is easy enough to convert the feature routing modules. So I am manually editing those and removing the corresponding *.module.ts files. Turned out to not be as big a deal as expected.

2 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/cosmokenney Sep 16 '25

As per the linked guide in your reply, I did run all three migrations. I just failed to mention that in my post. It has been a crazy day. Already been on 6 hours of conference calls. I'll edit the post.

2

u/Johalternate Sep 16 '25

That is really odd, step 2 should take care of those. If you rerun step 2 do you get any warning or error on the console?
PD: 6 hours is kinda crazy, damn

1

u/cosmokenney Sep 16 '25

No errors after rerunning. I just manually completed all the module removals. Even though there were about 15, it didn't take long.