node-glob: Cannot read property 'length' of undefined at Function.glob.hasMagic

Any idea why this could be happening?

22 08 2016 13:17:07.239:ERROR [karma]: TypeError: Cannot read property 'length' of undefined
  at Function.glob.hasMagic (/Users/user/frontend/node_modules/glob/glob.js:106:29)
  at rimraf (/Users/user/frontend/node_modules/rimraf/rimraf.js:61:36)
  at Object.module.exports.remove (/Users/user/frontend/node_modules/karma/lib/temp_dir.js:28:5)
  at Object._clearTempDirAndReportDone (/Users/user/frontend/node_modules/karma/lib/launchers/process.js:106:13)
  at Object._onProcessExit (/Users/user/frontend/node_modules/karma/lib/launchers/process.js:102:10)
  at ChildProcess.<anonymous> (/Users/user/frontend/node_modules/karma/lib/launchers/process.js:68:12)
  at emitTwo (events.js:106:13)
  at ChildProcess.emit (events.js:191:7)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 8
  • Comments: 26 (2 by maintainers)

Most upvoted comments

I’m getting this too in Travis but unable to recreate locally, although my colleague can. Which is pretty weird, frankly.

[13:14:57] Requiring external module babel-register
[13:14:59] Using gulpfile ~/my_code/gulpfile.babel.js
[13:14:59] Starting 'clean:dist'...
[13:14:59] 'clean:dist' errored after 4.77 ms
[13:14:59] TypeError: Cannot read property 'length' of undefined
   at Function.glob.hasMagic (my_code/node_modules/rimraf/node_modules/glob/glob.js:106:29)
   at Function.rimrafSync [as sync] (my_code/node_modules/rimraf/rimraf.js:272:36)
   at my_code/node_modules/del/index.js:74:10
   at Array.forEach (native)
   at Function.module.exports.sync (my_code/node_modules/del/index.js:67:30)
   at Gulp.<anonymous> (gulpfile.babel.js:40:7)
   at module.exports (my_code/node_modules/orchestrator/lib/runTask.js:34:7)
   at Gulp.Orchestrator._runTask (my_code/node_modules/orchestrator/index.js:273:3)
   at Gulp.Orchestrator._runStep (my_code/node_modules/orchestrator/index.js:214:10)
   at Gulp.Orchestrator.start (my_code/node_modules/orchestrator/index.js:134:8)
   at /usr/local/lib/node_modules/gulp-cli/lib/versioned/^3.7.0/index.js:46:20
   at nextTickCallbackWith0Args (node.js:452:9)
   at process._tickCallback (node.js:381:13)
   at Function.Module.runMain (module.js:449:11)
   at startup (node.js:139:18)
   at node.js:999:3