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

Build error gulp browserify #340

Closed
rusekr opened this issue Oct 12, 2015 · 7 comments
Closed

Build error gulp browserify #340

rusekr opened this issue Oct 12, 2015 · 7 comments
Milestone

Comments

@rusekr
Copy link

rusekr commented Oct 12, 2015

Hello! Trying to build with defaults and 'gulp' command and getting error:

[14:29:07] Starting 'browserify'...
[14:29:07] 'browserify' errored after 806 ms
[14:29:07] TypeError: must start with number, buffer, array or string
at fromObject (buffer.js:167:9)
at new Buffer (buffer.js:58:10)
at Concat.add (/home/su/wprojects/jssip-rusekr/node_modules/gulp-header/node_modules/concat-with-sourcemaps/index.js:40:15)
at DestroyableTransform.TransformStream as _transform
at DestroyableTransform.Transform._read (/home/su/wprojects/jssip-rusekr/node_modules/gulp-header/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:10)
at DestroyableTransform.Transform._write (/home/su/wprojects/jssip-rusekr/node_modules/gulp-header/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:160:12)
at doWrite (/home/su/wprojects/jssip-rusekr/node_modules/gulp-header/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:326:12)
at writeOrBuffer (/home/su/wprojects/jssip-rusekr/node_modules/gulp-header/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:312:5)
at DestroyableTransform.Writable.write (/home/su/wprojects/jssip-rusekr/node_modules/gulp-header/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:239:11)
at write (/home/su/wprojects/jssip-rusekr/node_modules/vinyl-source-stream/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
[14:29:07] 'dist' errored after 3.85 s

By some debugging helped cutting line 50 from gulpfile.js with contents:

    .pipe(header(BANNER, BANNER_OPTIONS))

Same banner addition after uglify don`t throws this error.

Any suggestion?

@ibc
Copy link
Member

ibc commented Oct 12, 2015

A fresh git clone of JsSIP does perfectly work when running gulp on it (after npm install of course).

But: you need gulp-cli branch 0.4 globally installed as the BUILDING documentation clearly states.

If you don't want to globally install gulp-cli branch 0.4, you can run node_modules/.bin/gulp within the JsSIP folder.

@ibc ibc closed this as completed Oct 12, 2015
@rusekr
Copy link
Author

rusekr commented Oct 13, 2015

Did exactly as you say (removed npm_modules dir, npm install, gulp-cli 0.4 system-wide, have read BUILDING) and got this error. On fresh clone too. Using nodejs v4.0.0.

@ibc
Copy link
Member

ibc commented Oct 13, 2015

It seems that it does not work with Node 4.0.0 (I use 0.12.0). I cannot handle this issue for now until gulp-cli and gulp release a stable version (probably suitable for Node >= 4.0.0).

May you please provide more info on how to avoid the issue? Does it work if banner() is called after uglify()? May you extend it?

@rusekr
Copy link
Author

rusekr commented Oct 14, 2015

Tried other banner places in browserify task, works only if I make addition of banner as separate task.

@rusekr
Copy link
Author

rusekr commented Oct 14, 2015

And again - after uglify standart addition of banner works fine.

@ibc
Copy link
Member

ibc commented Dec 1, 2015

Finally I added vinly-buffer which magically fixes the issue:

gulp-community/gulp-header#23

@rusekr
Copy link
Author

rusekr commented Dec 4, 2015

Thanks! Commit may be modified by me therefore disappeared but it was dirty hack anyway.

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

No branches or pull requests

2 participants