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

Duplicate data property in object literal not allowed in strict mode #3

Open
anshad opened this issue Apr 25, 2017 · 0 comments
Open

Comments

@anshad
Copy link

anshad commented Apr 25, 2017

Task:

gulp.task('scripts', function() {

function createErrorHandler(name) {
return function (err) {
console.error('Error from ' + name + ' in compress task', err.toString());
};
}

return gulp.src(srcDir + '/app/**/*.js')
.on('error', createErrorHandler('gulp.src'))
.pipe(removeUseStrict())
.on('error', createErrorHandler('remove'))
.pipe(sourcemaps.init())
.pipe(concat('app.min.js'))
//.pipe(gulpif(!dist, uglify()))
.pipe(gulpif(!dist, gulp.dest(devDir + '/scripts/')))
.pipe(gulpif(!dist, connect.reload()))
.pipe(gulpif(dist, uglify())) // gulpif(dist, uglify())
.on('error', createErrorHandler('uglify'))
.pipe(gulpif(dist, stripDebug()))
.on('error', createErrorHandler('strip'))
.pipe(gulpif(!dist, sourcemaps.write('/')))
.pipe(gulpif(dist, gulp.dest(distDir + '/scripts/')))
.on('error', createErrorHandler('gulp.dest'));
});

It gives me this error:

/Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:3872
throw e;
^

Error: Line 26: Duplicate data property in object literal not allowed in strict mode
at throwError (/Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:1161:21)
at throwErrorTolerant (/Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:1172:24)
at parseObjectInitialiser (/Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:1460:25)
at parsePrimaryExpression (/Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:1556:20)
at /Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:3609:38
at trackLeftHandSideExpressionAllowCall (/Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:3504:61)
at parsePostfixExpression (/Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:1703:20)
at /Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:3609:38
at parseUnaryExpression (/Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:1784:16)
at /Users/anshad/Desktop/GitLab/Workspace/FrontEnd/node_modules/remove-use-strict/node_modules/esprima/esprima.js:3609:38

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

1 participant