I’m running Cypress tests on LambdaTest, but they fail with ‘Cannot find module’ error. It runs fine locally. How to fix this?
Hi Toby,
This issue typically arises when a necessary dependency is missing during test execution. When running Cypress tests on LambdaTest, the dependency is retrieved from the npm_dependency
object.
You have two options: either include all required dependencies (matching your package.json
) in the npm_dependency
object or remove the npm_dependency
object entirely. In the latter case, LambdaTest’s Cypress CLI will fetch the dependency from package.json
.