Open MikeMcC399 opened 1 year ago
Hello. I also had this issue, but it is resolved for me in v13.6.3 😎
@MadelineMcN
Hello. I also had this issue, but it is resolved for me in v13.6.3 😎
Thanks for your feedback. I don't know what the root cause is, however the repro steps I listed in the original post continue to cause the error to occur in Cypress 13.6.3
.
I can't reproduce this issue anymore. Perhaps it was fixed in webpack
?
Node.js v20.15.0
├── cypress@13.13.0
├── webpack-cli@5.1.4
├── webpack-dev-server@5.0.4
└── webpack@5.92.1
For anyone still experiencing this problem, what solved it for us was moving the browserslist config from .browserslistrc
to package.json. I did not dig too deeply into the problem, it might be something specific to our configuration.
What I've found is that it did not work with multiple environments specified in .browserslistrc
(just an example below):
[modern]
last 2 versions
[legacy]
last 2 versions
While this worked:
last 2 versions
Edit - versions affected:
"webpack": "^5.94.0",
"cypress": "13.14.0",
"browserslist": "^4.21.5",
@mreljin
Thanks for your update! I can reproduce your issue. I don't know if this is actually a Cypress issue or not. I have updated the repro with your failing example:
git clone --branch browserslist https://github.com/MikeMcC399/github-action
cd github-action/examples/webpack
npm ci
npm start
I tried with the multiple environment example from the docs https://github.com/browserslist/browserslist?tab=readme-ov-file#configuring-for-different-environments and it did not fail, so I guess that the root cause may be difficult to track down:
.browserslistrc
[production]
> 1%
not dead
[modern]
last 1 chrome version
last 1 firefox version
[ssr]
node 12
Current behavior
If
.browserslistrc
from the npm module browserslist is configured with the entrytogether with a project using
webpack
, then Cypress E2E testing fails to run and outputs the error message:If the
.browserslistrc
entry is replaced bythen no error occurs.
Desired behavior
If
.browserslistrc
from the npm module browserslist is correctly configured, for instance with the entrychrome >= 116
, it should not prevent Cypress from successfully running an E2E test.Test code to reproduce
then in a separate terminal window, execute
Cypress Version
First reported on
13.3.0
Reproducible also on:13.15.2
Node version
v20.14.0
v20.15.0
Operating System
Ubuntu 22.04.3 LTS and Windows 11
Debug Logs
debug_28029.zip
Other
Versions used
browserslist documentation