Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to perform standalone migration in multi-workspace (with Angular schematics)

In a multi-project Angular repo, I could not manage to get the @angular/core:standalone-schematics to work (this allows an automatic conversion of module-based components to standalone components).

client
  projects
    proj1
    proj2

When I run ng generate @angular/core:standalone, no matter what my working directory is, no matter what I answer to "Which path in your project should be migrated?", I always end up with the error

Could not find any files to migrate under the path /Users/hoeni/Work/client/projects/... Cannot run the standalone migration.

The absolute path shown in the error message is correct and matches the chosen directory.

Any ideas why this is not working here?

like image 649
hoeni Avatar asked Oct 15 '25 19:10

hoeni


1 Answers

I know this is an older post, hoping you found an answer by now, but I believe you need to use the relative path to your project root, not the absolute.

In my case, I was converting a specific directory, and I couldn't use the ng command since my workspace was using nx... so I had to use npx nx g @angular/core:standalone --path=<relative_path>

like image 147
Stephen James Reich Avatar answered Oct 18 '25 14:10

Stephen James Reich