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

Error: Cannot find module 'xlsx'

Open suprabhachaudhary-myob opened this issue 3 years ago • 1 comments

Getting the following error when running the export to excel test on pipeline

Note: The same test runs fine on local in both browser and headless mode

The plugins file is missing or invalid.

  | [2022-01-31T03:25:35Z]   | [2022-01-31T03:25:35Z] 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.   | [2022-01-31T03:25:35Z]   | [2022-01-31T03:25:35Z] Or you might have renamed the extension of your pluginsFile. If that's the case, restart the test runner.   | [2022-01-31T03:25:35Z]   | [2022-01-31T03:25:35Z] Please fix this, or set pluginsFile to false if a plugins file is not necessary for your project.   | [2022-01-31T03:25:35Z]   | [2022-01-31T03:25:35Z] Error: Cannot find module 'xlsx'   | [2022-01-31T03:25:35Z] Require stack:   | [2022-01-31T03:25:35Z] - /e2e/cypress/plugins/read-xlsx.js

suprabhachaudhary-myob avatar Feb 01 '22 01:02 suprabhachaudhary-myob

You need to have xlsx installed I guess? These images here don't contain the node modules you need for your tests.

Narretz avatar Feb 09 '22 13:02 Narretz