Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Module cannot be found when running in Docker #38

Closed
sbattistin opened this issue Nov 25, 2019 · 2 comments
Closed

Module cannot be found when running in Docker #38

sbattistin opened this issue Nov 25, 2019 · 2 comments

Comments

@sbattistin
Copy link

sbattistin commented Nov 25, 2019

When trying to run the tests in a Docker container, the module cypress-plugin-retries cannot be found and the tests fail.

The output from the tests is the following.

Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank",

====================================================================================================,

  (Run Starting),

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐,
  │ Cypress:    3.6.1                                                                              │,
  │ Browser:    Electron 73 (headless)                                                             │,
  │ Specs:      1 found (test.js)                                                                  │,
  └────────────────────────────────────────────────────────────────────────────────────────────────┘,


────────────────────────────────────────────────────────────────────────────────────────────────────,
                                                                                                    ,
  Running:  test.js                                                                         (1 of 1),

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

  /cypress-tests/cypress/support/index.js,

The error was:,

Error: Cannot find module 'cypress-plugin-retries' from '/cypress-tests/cypress/support',


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.,

  (Results),

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐,
  │ Tests:        0                                                                                │,
  │ Passing:      0                                                                                │,
  │ Failing:      1                                                                                │,
  │ Pending:      0                                                                                │,
  │ Skipped:      0                                                                                │,
  │ Screenshots:  0                                                                                │,
  │ Video:        true                                                                             │,
  │ Duration:     0 seconds                                                                        │,
  │ Spec Ran:     test.js                                                                          │,
  └────────────────────────────────────────────────────────────────────────────────────────────────┘,


  (Video),

  -  Started processing:  Compressing to 32 CRF                                                     ,
  -  Finished processing: /cypress-tests/cypress/videos/test.js.mp4                      (4 seconds),


====================================================================================================,

  (Run Finished),


       Spec                                              Tests  Passing  Failing  Pending  Skipped  ,
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐,
  │ ✖  test.js                                    0ms        -        -        1        -        - │,
  └────────────────────────────────────────────────────────────────────────────────────────────────┘,
    ✖  1 of 1 failed (100%)                       0ms        -        -        1        -        -  ,

I tried both to install the module globally and with npm install from the package.json file but the error still shows up.

I need this to be able to run the cypress tests with Jenkins using Docker.

I attached a simple version with all necessary files to reproduce the problem.

CypressTest.zip

@sbattistin
Copy link
Author

Closed due to user (me) error

@pedbr
Copy link

pedbr commented Jan 21, 2020

@sbattistin Hey Stefano,

I'm getting the same error you had when running my CI build. How did you fix it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants