-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"logger.warn is not a function" when webpack-dev-server calls build-angular/webpack-browser-config #25312
Comments
Hi! Can you share your Angular project (minimal repro) as well as the before/after of We've got a bunch of tests around Angular vesions and Webpack, but we must be missing this particular combination. |
Hi @lmiller1990, yes, I will try to make a minimal repro, but it may take some time. I use Angular 15.0.4, and just installed Cypress so I don't know what happens in earlier versions. Here is my
|
@kussmaul apologies for the delayed reply. I was able to reproduce this with your |
@astone123 , sorry I somehow missed your message. Yes, I think that the |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
If I run
cypress open
(full command syntax below) and select "Component Testing", I get an "Unexpected Error":TypeError
Your
configFile
threw an error from:cypress.config.js
We stopped running your tests because your config file crashed.
Stack trace
Desired behavior
Cypress should not throw an error. :-)
If I edit
.browserslistrc
to exclude unsupported browsers, Cypress runs without the above error.Test code to reproduce
cypress.config.ts
Cypress Version
12.2.0
Node version
16.16.0
Operating System
Linux 6.0.11-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Dec 2 20:38:11 UTC 2022 x86_64 GNU/Linux
Debug Logs
Other
I am not familiar with the code for
@cypress/webpack-dev-server
or@angular-devkit/build-angular
, but it looks likeAngular's
normalizeBrowserSchema()
andgetSupportedBrowsers()
expect a logger object:https://github.com/angular/angular-cli/blob/2ba44a433c827413a53d12de0ef203f8988ddc2a/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts
https://github.com/angular/angular-cli/blob/2ba44a433c827413a53d12de0ef203f8988ddc2a/packages/angular_devkit/build_angular/src/utils/supported-browsers.ts
and the only
logger
I see inangularHandler.ts
is increateFakeContext()
https://github.com/cypress-io/cypress/blob/331c1dcc9c3f4d4212e27290d705ed94ba58c3d0/npm/webpack-dev-server/src/helpers/angularHandler.ts
The text was updated successfully, but these errors were encountered: