homerboy homerboy - 1 year ago 215
Node.js Question

Unexpected token .pipe in Gulp

This is a similar question to: unexpected token .pipe in gulpfile.js but I still don't have an exact solution to this issue.

I am receiving an unexpected token at the

when I run
. Here is my gulpfile.js:

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

gulp.task('default', function() {
return gulp.src('src/**');

And here is my

"name": "react-project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"author": "",
"license": "ISC",
"dependencies": {
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-react": "^3.1.0",
"latest-version": "^2.0.0"

And this is how I installed gulp, gulp-react, and gulp-concat:

npm install --save gulp gulp-react gulp-concat

Any help would be awesome.

Answer Source

Cut the semi-colon at the end of the line with return, before pipe:

gulp.task('default', function() {
    return gulp.src('src/**'); // HERE
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download