Skip to content

TypeError: Cannot read property 'reduce' of undefined #13

Open
@JamesLMilner

Description

Hey, thanks for the library.

I'm having issues using gulp-flatten. I am using

  return gulp.src('./components/**/*.pug')
        // .pipe(print())
        .pipe(flatten())
        .pipe(pug({ verbose : false }))
        .pipe(gulp.dest("./../public/templates/"))

also tried

  return gulp.src('./components/**/*.pug')
        // .pipe(print())
        .pipe(pug({ verbose : false }))
        .pipe(flatten())
        .pipe(gulp.dest("./../public/templates/"))

Both produce the following error:

 TypeError: Cannot read property 'reduce' of undefined
    at _flatten (/home/james/Code/3drepo.io/frontend/node_modules/flatten/index.js:14:16)
    at flatten (/home/james/Code/3drepo.io/frontend/node_modules/flatten/index.js:11:10)
    at Gulp.<anonymous> (/home/james/Code/3drepo.io/frontend/gulpfile.js:56:15)
    at module.exports (/home/james/Code/3drepo.io/frontend/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/home/james/Code/3drepo.io/frontend/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/home/james/Code/3drepo.io/frontend/node_modules/orchestrator/index.js:214:10)
    at Gulp.Orchestrator.start (/home/james/Code/3drepo.io/frontend/node_modules/orchestrator/index.js:134:8)
    at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Using:
Node.js LTS 6.11.2
Gulp 3.9.1

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions