Open chrisstoy opened 2 years ago
Is there a workaround at this time? I have an Angular 13 app in Nx 13 monorepo and even running the default Angular CLI generator fails with the same issue (ng g @jscutlery/cypress-angular:setup-ct --project <app name>
vs nx g @jscutlery/cypress-angular:setup-ct --project <app name>
)
I would need to investigate the installation generator, but the repo itself is using Angular 13 and Nx 13 so you can configure it by hand as a workaround.
Thanks for looking into this! If you have the time, could you explain a bit more what you meant by "configure it by hand"? What would need to be configured as a workaround? I could even go off of a general starting point if I knew where to look.
I guess the issue is related to the NX 13 migration of "moving the projects array from nx.json to workspace.json".
@ maintainers: You probably want to update your @nrwl/devkit dependency so that it will detect if users already did that migration or not.
Workaround working for me:
The dependency@nrwl/devkit is up to date. I don't reproduce this. Can you confirm it does not occur with the last version?
@edbzn I was talking about this one: https://github.com/jscutlery/devkit/blob/main/packages/cypress-angular/package.json, I can confirm that the setup-ct step works. I did not get it to run yet though.
Hi @maxfriedmannm, sorry for responding so late. So setu-ct works? What kind of trouble are you getting afterwards?
I have a project on Nx and Angular on v14 and I get the same error. Our mono-repo uses angular.json
as the root project file. I manually edited the references in your node_modules folder to change nx.json to angular.json and it "worked" feels hacky though and not sure it won't cause issues down the road.
Any way support can be added for Nx monorepos not using the nx.json file?
I would need to investigate the installation generator, but the repo itself is using Angular 13 and Nx 13 so you can configure it by hand as a workaround.
Is there a guide to manually configuring this? Is it similar to the way it was done on the old GitHub?
I'm trying to configure cypress-angular but am running into this issue:
Cannot set property 'demo' of undefined
demo-app
and an Angular app nameddemo
Running with
--verbose
I get the following stack trace:It appears that this is failing because it is trying to read
nx.json
to modify the projects, but projects are not defined there in Nx v13. Trying to manually add projects to nx.json yields:What is interesting is that, if I create an empty workspace first, and THEN add the angular application, this process seems to work.