Open kerry-afs opened 3 years ago
Hello, I just tried with a workspace version 12.10.0 and I was not able to reproduce it, I will need more details or a reproduction.
Thanks for the quick response! Let me try and build a project really quickly to repro the issue and share the repository.
I was able to bypass this (manually) by setting up my plugins/index.ts, settings/index.ts, angular.json and cypress.json files accordingly. That seems to allow the project to build; however, on running nx run project-e2e:ct
it fires up the Cypress instance, but then hangs. The runner is not visible, and the only output (even when passing the --verbose
flag) is:
> nx run project-e2e:ct
NOTE:
You can now remove the use of the '--headless' flag.
If your run depends on a Chrome extension being loaded during 'cypress run', you should explicitly pass the '--headed' flag.
If you are trying to execute 'cypress open', you should pass the '--watch' flag instead.
Is there a way for me to view the output so I can determine where this might be hanging? When I attempt to reproduce it with similar settings in the new Nx project I fired up, it seems to be fine, so I'm at a loss.
I also understand this issue is separate from the bug I logged, so if a new bug is needed for help here, I am happy to log a new one. 😄
You're able to reproduce the first issue with a clean workspace? I want to be sure the setup works correctly before digging into the executor.
By any chance your repo is accessible?
I was not. It worked as expected in the clean workspace, so that was good! There were a couple of items I noticed in the new workspace that is different than how our monorepo generally works:
nx g @jscutlery/cypress-angular:setup-ct --project projectName
will generate a new plugins/index.ts
and support/index.ts
under a cypress
directory. Typically in Nx, these are configured to be contained in src/plugins
and src/index
, respectively.tsconfig.cypress.json
is configured for the ct tests in the above command, but we have a tsconfig.e2e.json
configuration for our Cypress tests. I am unsure if this is able to be consolidated, but I've been toying around with this a bit to see if there's a property that's throwing me off when the ct test is attempting to initialize....on running nx run project-e2e:ct it fires up the Cypress instance, but then hangs. The runner is not visible, and the only output (even when passing the --verbose flag) is:
> nx run project-e2e:ct
NOTE:
You can now remove the use of the '--headless' flag.
If your run depends on a Chrome extension being loaded during 'cypress run', you should explicitly pass the '--headed' flag.
If you are trying to execute 'cypress open', you should pass the '--watch' flag instead.
Alright, I think I may have figured out what the issue is with the above. I found that this occurs once I add Webpack 5 to the project (which my team is using). I've filled out a new bug for that issue at #106
@kerry-afs I am also getting this error, but I do not have Webpack 5 installed as a dev dependency. I just have the latest v12 of Angular installed. and v5.5.0 of html-webpack-plugin.
I installed a new workspace with only angular (nx 14.4.2). Brand new, I installed this package and tried to setup it and I got the error.
Hey there,
We're using Nx in our project, and when attempting to run the command
nx g @jscutlery/cypress-angular:setup-ct --project projectName
, I get the following output:The "path" argument must be of type string. Received undefined."
That is the extent of the output on my end with no additional details, so it's been challenging trying to find a root cause. Has anyone experienced this before and have insight on how to rectify this? Thanks in advance.
Versions: