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

gulp@4.0.0-alpha.3 breaks gulp scripts with "Error: write callback called multiple times" #2070

Closed
ghost opened this issue Dec 25, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 25, 2017

at afterTransform (PROJECT\node_modules\readable-stream\lib_stream_transform.js:96:33)
at TransformState.afterTransform (PROJECT\node_modules\readable-stream\lib_stream_transform.js:79:12)
at PROJECT\node_modules\gulp-requirejs-optimize\index.js:122:4
at PROJECT\node_modules\requirejs\bin\r.js:3059:39
at PROJECT\node_modules\requirejs\bin\r.js:2999:25
at Function.prim.nextTick (PROJECT\node_modules\requirejs\bin\r.js:28077:9)
at Object.errback (PROJECT\node_modules\requirejs\bin\r.js:2998:26)
at Object.callback (PROJECT\node_modules\requirejs\bin\r.js:2984:23)
at Object.then (PROJECT\node_modules\requirejs\bin\r.js:3038:23)
at runBuild (PROJECT\node_modules\requirejs\bin\r.js:30291:48)

@wlwr
Copy link

wlwr commented Dec 26, 2017

I have the same problem.

@phated
Copy link
Member

phated commented Dec 26, 2017

@ArtemChornovol is there a reason you didn't use the PR template? Your stacktrace pretty clearly shows that the issue is in gulp-requirejs-optimize. I'm guessing they are calling the through2 callback more than once (hence "callback called multiple times")

I also noticed they are using gulp-util which is deprecated and the project seems unmaintained. You should probably use requirejs directly like I have done at https://github.com/phated/requirejs-example-gulpfile/blob/master/gulpfile.js

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