Skip to content
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

[frontend] Cypress tests are failing #1990

Closed
puckpuck opened this issue Feb 3, 2025 · 1 comment · Fixed by #2072
Closed

[frontend] Cypress tests are failing #1990

puckpuck opened this issue Feb 3, 2025 · 1 comment · Fixed by #2072
Labels
bug Something isn't working

Comments

@puckpuck
Copy link
Contributor

puckpuck commented Feb 3, 2025

Bug Report

Running make run-tests, the Cypress tests for the frontend service fail with the following error. This is after clearing docker cache (system prune) and removing the src/frontend/node_modules folder.

  Running:  Home.cy.ts                                                                      (2 of 3)

Oops...we found an error preparing this test file:

  > cypress/e2e/Home.cy.ts

The error was:

Error: Webpack Compilation Error
./node_modules/uuid/dist/esm-browser/v35.js 19:18
Module parse failed: Unexpected token (19:18)
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
|         namespace = parse(namespace);
|     }
>     if (namespace?.length !== 16) {
|         throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|     }
 @ ./node_modules/uuid/dist/esm-browser/v3.js 2:0-41 3:0-36 3:0-36 3:0-36 5:11-14 7:9-12 8:9-12
 @ ./node_modules/uuid/dist/esm-browser/index.js
 @ ./gateways/Session.gateway.ts
 @ ./cypress/e2e/Home.cy.ts
    at handle (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:180:23)
    at finalCallback (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:257:39)
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:306:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:154:20)
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:304:22
    at Compiler.emitRecords (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:499:39)
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:298:10
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:485:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:154:20)
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:482:27
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/neo-async/async.js:2818:7
    at done (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/neo-async/async.js:3522:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:154:20)
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:464:33
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:143:16
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:143:16
    at /root/.cache/Cypress/10.3.1/Cypress/resources/app/node_modules/@packages/server/node_modules/graceful-fs/graceful-fs.js:61:14
    at FSReqCallback.oncomplete (node:fs:188:23)

This occurred while Cypress was compiling and bundling your test code. This is usually caused by:

- A missing file or dependency
- A syntax error in the file or one of its dependencies

Fix the error in your code and re-run your tests.
@puckpuck puckpuck added the bug Something isn't working label Feb 3, 2025
@julianocosta89
Copy link
Member

Adding to that, it would be great if we implemented some tests in all services to ensure they are not breaking whenever there is a dependency bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants