1
Error: Webpack Compilation Error
./node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js 429:27
Module parse failed: Unexpected token (429:27)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|   // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- types are not aware of older browsers that don't implement `labels`
|   if (element.labels !== undefined) {
>     return element.labels ?? [];
|   }
| 

my package.json file is:

{
  "name": "svt-automation-ui",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "cy:open": "cypress open"
  },
  "devDependencies": {
    "@cypress/skip-test": "^2.6.1",
    "@testing-library/cypress": "^8.0.2",
    "cypress": "^10.8.0",
    "cypress-iframe": "^1.0.1",
    "cypress-log-to-output": "^1.1.2",
    "cypress-xpath": "^1.6.2"
  },
  "dependencies": {
    "webpack": "^5.74.0"
  }
}
Youssouf Oumar
  • 29,373
  • 11
  • 46
  • 65
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 19 '22 at 07:08
  • 5
    Please see [this question](https://stackoverflow.com/questions/73768031/cypress-remix-error-webpack-compilation-error-node-modules-testing-library-d) for a resolution. – Fody Sep 19 '22 at 20:41
  • Fody thank you, reverting @testing-library-dom resolved the issue. – jckmlczk Sep 20 '22 at 08:26

0 Answers0