Closed oco2000 closed 2 years ago
Thanks for reporting this!
Could you provide a minimal repo where the issue can be reproduced?
Cypress tests shouldn't have any direct dependency on Angular packages. Cypress tests run against an application that has already been built and served. That sounds like building the application is what's failing and not running the tests.
I can see you are using several community plugins including @angular-builders/custom-webpack: 12.1.3
which might not yet support Angular 13 changes and it could cause the build to fail.
@leosvelperez I am having just the same issue and I don't use @angular-builders/custom-webpack: 12.1.3
.
This happens when importing something with an angular dependency.
In my case, I have an input component that also exports a validation message (for testing purposes). When importing this validation message (it is an exported const), It is then that this error pops.
@oco2000 any workaround on your side?
Thans!
I am having the same issue (Migrating Angular from 12 to 13). Steps to reproduce were provided in: https://github.com/nrwl/nx/issues/7967
Let me know if there are any workarounds 🙏
We are looking into this. This is broken due to the Angular packages now only being distributed with ESM. There's an issue open in the Cypress repo tracking this and there's this comment with a workaround for those of you that are importing from @angular/cdk
directly in your Cypress tests.
If you are importing code from your application/library that workaround alone might not solve the issue you're having and it might be solved by additionally adding an import '@angular/cli'
at the top of your Cypress tests that have the issue.
It looks like a workaround has been found on the Cypress Issue thread: https://github.com/cypress-io/cypress/issues/19066#issuecomment-1012055705
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Cypress tests fail
Expected Behavior
Cypress tests pass
Steps to Reproduce
Upgrade the existing project using standard migration procedure
Failure Logs
Environment