You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When revisioner.files is empty, we run RevAll.manifestFile() or RevAll.versionFile() will occur the 'TypeError...' below:
path.js:8
throw new TypeError('Path must be a string. Received ' +
^
TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.posix.join (path.js:479:5)
at Revisioner.versionFile (/project/node_modules/gulp-rev-all/revisioner.js:87:24)
at Transform._flush (/project/node_modules/gulp-rev-all/index.js:58:34)
at Transform.<anonymous> (/project/node_modules/gulp-rev-all/node_modules/readable-stream/lib/_stream_transform.js:135:12)
at Transform.g (events.js:260:16)
at emitNone (events.js:67:13)
at Transform.emit (events.js:166:7)
at finishMaybe (/project/node_modules/gulp-rev-all/node_modules/readable-stream/lib/_stream_writable.js:371:12)
at endWritable (/project/node_modules/gulp-rev-all/node_modules/readable-stream/lib/_stream_writable.js:378:3)
The way to fix this problem is detect whether or not revisioner.files is empty when call and RevAll.manifestFile() or RevAll.versionFile().
RevAll.prototype.versionFile=function(){varrevisioner=this.revisioner;// Drop any existing files off the stream, push the generated version filereturnThrough.obj(function(file,enc,callback){// Drop any existing files off the streamcallback();},function(callback){if(revisioner.files.length>0)this.push(revisioner.versionFile());callback();});};RevAll.prototype.manifestFile=function(){varrevisioner=this.revisioner;// Drop any existing files off the stream, push the generated manifest filereturnThrough.obj(function(file,enc,callback){callback();},function(callback){if(revisioner.files.length>0)this.push(revisioner.manifestFile());callback();});};
The text was updated successfully, but these errors were encountered:
loo2k
added a commit
to loo2k/gulp-rev-all
that referenced
this issue
Jun 17, 2016
When
revisioner.files
is empty, we runRevAll.manifestFile()
orRevAll.versionFile()
will occur the 'TypeError...' below:The way to fix this problem is detect whether or not
revisioner.files
is empty when call andRevAll.manifestFile()
orRevAll.versionFile()
.The text was updated successfully, but these errors were encountered: