cypress-parallel icon indicating copy to clipboard operation
cypress-parallel copied to clipboard

TypeError: glob is not a function

Open flavianh opened this issue 1 year ago • 1 comments

Hello, I came across this problem today. The problem comes from cypress-parallel/test-suites.js which imports glob using const glob = require('glob');.

There are two problems hidden behind this:

  • Since version 9, the glob function should be imported with const { glob } = require('glob');
  • The glob package is not given a version range in cypress-parallel, and it should be >=9 for this first change not to break other installations

Thanks

flavianh avatar Jul 31 '23 19:07 flavianh

I face the the same problem. I can't use "cypress-parallel" because of this.

Is there any workaround?

Update: A (rather dirty) workaround for me that worked is installing old library version of glob in the project that consumes "cypress-parellal": npm install glob@^7.2.3 --save-dev

ngraf avatar Jan 22 '24 13:01 ngraf