cypress icon indicating copy to clipboard operation
cypress copied to clipboard

webpack 5 error when module contains dynamic import: "Automatic publicPath is not supported in this browser"

Open OliverJAsh opened this issue 2 years ago • 3 comments

Current behavior

Same as https://github.com/cypress-io/cypress/issues/18435. This issue was marked as fixed but I can still reproduce using the latest version of Cypress. Full reduced test case: https://github.com/OliverJAsh/cypress-webpack-5-public-path-error/tree/upgrade

Unfortunately I had to open a new issue because https://github.com/cypress-io/cypress/issues/18435 has been locked.

Desired behavior

No response

Test code to reproduce

https://github.com/OliverJAsh/cypress-webpack-5-public-path-error/tree/upgrade

Cypress Version

10.9.0

Node version

16.3.0

Operating System

macOS 12.6

Debug Logs

No response

Other

No response

OliverJAsh avatar Sep 29 '22 09:09 OliverJAsh

Confirming that I also still get the same issue with: Cypress 10.9.0 Node: 14.17.3 locally MacOS: 12.6 - M1 chip in ci, docker base image: cypress/base:14.17.3

So still I use the workaround suggested here

mysticdevx avatar Sep 30 '22 08:09 mysticdevx

@OliverJAsh thanks for the reproduction again

astone123 avatar Sep 30 '22 15:09 astone123

Any news on this one? It's still reproducible in version 13.6.3.

We have a library that we're using in two apps. The library uses dynamic imports. For one of the apps we're now creating tests in Cypress and also import code from the library in the test files. Those tests will not run due to this webpack 5 error. In the library we don't have set a publicPath so it uses 'auto' by default. The apps both work as expected, but inside a Cypress test we get this error.

jeroen-hoekstra avatar Apr 30 '24 11:04 jeroen-hoekstra