Closed PeterKruzlics closed 8 years ago
Can you make a repo that reproduces this issue with the minimum amount of code?
I can, may take a while...
I continued fooling around with it and figured out why the file.base
was returning undefined.
My code segment surrounding the rename function:
var browserify = require('browserify');
var source = require("vinyl-source-stream");
var rename = require('gulp-rename');
var b = browserify(conf);
b.bundle()
.pipe(source('./vendor.js'))
.pipe(rename({dirname: "", basename: "", extname: "vendor.js"}))
I had grabbed this template off of an example online which had stated that the source()
part doesn't have to reference an actual file (just a random file name) since the file will get created with the browserified contents. However, when you have a file in there that doesn't exist, the file.base
in gulp-rename is undefined.
I created an empty file and pointed the source()
part to that, and now it works fine... not sure if that is sufficient information.
Not sure if a check should be put in for that, but otherwise this issue was my bad and can probably be closed... Thanks!
Hello,
I am using gulp-rename to rename a browserify bundle, and I am getting an "Arguments to path.join must be strings" error, which I managed to trace back to find that file.base is undefined (line 52 in index.js). I have been playing around with the rename function in gulp but haven't been able to set the file.base var any actual value. Can there be a default blank value so this error doesn't occur?
Thanks, Peter