cypress-docker-images icon indicating copy to clipboard operation
cypress-docker-images copied to clipboard

Docker Image for cypress/include:10.3.1 not working

Open AshwinVoiro opened this issue 3 years ago • 2 comments

I used the below command to create and run the container docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v ${PWD}:/e2e -w /e2e cypress/included:10.3.1 But I am getting the below error:

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) [210:0729/194814.670801:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process. [210:0729/194814.685418:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported. Your configFile is invalid: /e2e/cypress.config.js

It threw an error when required, check the stack trace below:

ReferenceError: dayjs is not defined at Object. (/e2e/node_modules/cypress/lib/tasks/cache.js:27:1) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/e2e/node_modules/cypress/lib/cli.js:22:15) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/e2e/node_modules/cypress/lib/cypress.js:16:13) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/e2e/node_modules/cypress/index.js:35:22)

My cypress.config.js file:

const { defineConfig } = require("cypress"); module.exports = defineConfig({ e2e: { viewportWidth: 1536, viewportHeight: 864, setupNodeEvents(on, config) { // implement node event listeners here }, }, });

My package.json:

{ "name": "test", "version": "1.0.0", "description": "npm", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "", "license": "ISC", "devDependencies": { "cypress": "^10.3.1" }, "dependencies": {} }

AshwinVoiro avatar Jul 29 '22 19:07 AshwinVoiro

This is the error: ReferenceError: dayjs is not defined. What is dayjs?

admah avatar Aug 04 '22 21:08 admah

@admah dayjs is npm package. But if you see my package.json file, I am not using that package. Also this issue is pointing to a file inside the cypress npm package. So my guess is dayjs is being used internally by cypress

AshwinVoiro avatar Aug 25 '22 09:08 AshwinVoiro