Skip to content

getting webpack-dev-server warning on resqInjector.js attaching the error. #314

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
vijaykumar19 opened this issue Apr 21, 2022 · 1 comment

Comments

@vijaykumar19
Copy link

Compiled with problems:X

WARNING in ../../node_modules/cypress-react-selector/src/resqInjector.js 12:15-22

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

I am stuck here and i see a fix for this in webpack-dev-server but however, along with cypress/webpack-dev-server it didnt work. Kindly help with here. Attached screenshot of the overlay which blocks the cypress event handlers. and after click on X mark, we can see the actual screen.
cypress-error.pdf

@jpalomar
Copy link

jpalomar commented Apr 22, 2022

could it be that webpack-dev-server is displaying an error?

https://webpack.js.org/configuration/dev-server/#overlay

module.exports = {
  //...
  devServer: {
    client: {
      overlay: {
        errors: true,
        warnings: false,
      },
    },
  },
};

Applying this configuration to a webpack build will remove the warning from being displayed.

but it will not mask the warning from cli:

WARNING in ./node_modules/cypress-react-selector/src/resqInjector.js 16:13-20
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

webpack/webpack#2675

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants