Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

283
Vistas
buildkite error : The plugins file is missing or invalid. Cannot find module 'xlsx' when running cypress test . Runs fine on local

I am getting error when running the cypress test on buildkite as below:

Status: Downloaded newer image for cypress/included:6.1.0

[2022-01-31T10:32:13Z] Your pluginsFile is set to /e2e/cypress/plugins/index.js, but either the file is missing, it contains a syntax error, or threw an error when required. The pluginsFile must be a .js, .ts, or .coffee file.

Or you might have renamed the extension of your pluginsFile. If that's the case, restart the test runner.

Please fix this, or set pluginsFile to false if a plugins file is not necessary for your project.

Error: Cannot find module 'xlsx' Require stack:

  • /e2e/cypress/plugins/read-xlsx.js
  • /e2e/cypress/plugins/index.js

the same test runs fine on local on both browser and headless

"xlsx" is present in the package.json as both dependencies and dev dependencies.

code inside read-xlsx

const XLSX = require("xlsx");
const fs = require("fs");

const read = ({file, sheet}) => {
  const buf = fs.readFileSync(file);
  const workbook = XLSX.read(buf, { type: 'buffer' });
  const rows = XLSX.utils.sheet_to_json(workbook.Sheets[sheet]);
  return rows
}
 
module.exports = {
  read
}

Someone please help

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I had the same problem. But in my case, was an issue with case sensitive. I put 'XLSX' inside the require in the read-xlsx.js file.

My read-xlsx.js file became like this and worked:

const fs = require('fs')
const XLSX = require('xlsx')
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda