Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing path in file options #133

Closed
majabee opened this issue Jan 1, 2017 · 2 comments
Closed

Missing path in file options #133

majabee opened this issue Jan 1, 2017 · 2 comments

Comments

@majabee
Copy link

majabee commented Jan 1, 2017

Module Versions:
node: 7.2.1
npm: 3.10.10
gulp: 3.9.1
gulp-concat: 2.6.1
gulp-sourcemaps: 2.2.1

When I´m running my gulp concat task i get this error message:

[21:34:18] Starting 'concatjs'...
[21:34:18] 'concatjs' errored after 15 ms
[21:34:18] Error: gulp-concat: Missing path in file options
at module.exports (/Users/xx/yy/sites/projects/gulptest/node_modules/gulp-concat/index.js:32:11)
at Gulp. (/Users/xx/yy/sites/projects/gulptest/gulpfile.js:242:9)
at module.exports (/Users/xx/yy/sites/projects/gulptest/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/xx/yy/sites/projects/gulptest/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/xx/yy/sites/projects/gulptest/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/Users/xx/yy/sites/projects/gulptest/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:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3

my gulpfile looks like this:

var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('concatjs', function() {
  return gulp.src([
    './src/core/scripts/vendor/source1.js',
    './src/core/scripts/vendor/source2.js'
  ])
  .pipe(sourcemaps.init())
  .pipe(concat(['global.js'], {newLine: ';'}))
  .pipe(sourcemaps.write())
  .pipe(gulp.dest('./build/scripts'));
});

gulp.task('default', ['concatjs']);

What can I do to solve this and what is the problem.

@yocontra
Copy link
Member

yocontra commented Jan 1, 2017

concat('global.js', {newLine: ';'}) not concat(['global.js'], {newLine: ';'}) - the argument is a string not an array

@yocontra yocontra closed this as completed Jan 1, 2017
@majabee
Copy link
Author

majabee commented Jan 1, 2017

THANK YOU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants