sync always errors when trying to delete files
clocked0ne opened this issue · comments
clocked0ne commented
Every time I try to use sync, I get the same error when it reaches the point of deleting out of date files - at first I thought it might be a permissions issue but the users all have the correct read/write permissions having tested it outside of this:
[13:36:44] [delete] static-dev/main.css
events.js:154
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'substr' of undefined
at Transform._transform (/<path-masked>/node_modules/gulp-cloudfront/index.js:21:33)
at Transform._read (/<path-masked>/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Transform._write (/<path-masked>/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/<path-masked>/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (/<path-masked>/node_modules/readable-stream/lib/_stream_writable.js:227:5)
at Transform.Writable.write (/<path-masked>/node_modules/readable-stream/lib/_stream_writable.js:194:11)
at DestroyableTransform.ondata (stream.js:31:26)
at emitOne (events.js:90:13)
at DestroyableTransform.emit (events.js:182:7)
at DestroyableTransform.<anonymous> (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at emitNone (events.js:80:13)
at DestroyableTransform.emit (events.js:179:7)
at emitReadable_ (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
at readableAddChunk (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
at DestroyableTransform.Readable.push (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
at DestroyableTransform.Transform.push (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
at afterTransform (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
at TransformState.afterTransform (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
at DestroyableTransform._transform (/<path-masked>/node_modules/gulp-awspublish/lib/log-reporter.js:39:5)
at DestroyableTransform.Transform._read (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
at DestroyableTransform.Writable.write (/<path-masked>/node_modules/gulp-awspublish/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
at Transform.ondata (_stream_readable.js:536:20)
at emitOne (events.js:90:13)
at Transform.emit (events.js:182:7)
at readableAddChunk (_stream_readable.js:153:18)
at Transform.Readable.push (_stream_readable.js:111:10)
at Transform.push (_stream_transform.js:128:32)
at [object Object].<anonymous> (/<path-masked>/node_modules/gulp-awspublish/lib/index.js:390:14)
at emitOne (events.js:90:13)
at [object Object].emit (events.js:182:7)
at readableAddChunk (/<path-masked>/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:198:18)
at [object Object].Readable.push (/<path-masked>/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:157:10)
at [object Object].Duplexify._forward (/<path-masked>/node_modules/duplexify/index.js:162:26)
at XmlToObj.onreadable (/<path-masked>/node_modules/duplexify/index.js:126:10)
at emitNone (events.js:80:13)
at XmlToObj.emit (events.js:179:7)
at emitReadable_ (_stream_readable.js:419:10)
at emitReadable (_stream_readable.js:413:7)
at readableAddChunk (_stream_readable.js:164:13)
at XmlToObj.Readable.push (_stream_readable.js:111:10)
at XmlToObj.Transform.push (_stream_transform.js:128:32)
at /<path-masked>/node_modules/xml-objects/index.js:24:10
at Parser.<anonymous> (/<path-masked>/node_modules/xml2js/lib/xml2js.js:484:18)
at emitOne (events.js:90:13)
at Parser.emit (events.js:182:7)
at Object.onclosetag (/<path-masked>/node_modules/xml2js/lib/xml2js.js:445:26)
at emit (/<path-masked>/node_modules/sax/lib/sax.js:640:35)
at emitNode (/<path-masked>/node_modules/sax/lib/sax.js:645:5)
at closeTag (/<path-masked>/node_modules/sax/lib/sax.js:905:7)
at Object.write (/<path-masked>/node_modules/sax/lib/sax.js:1449:13)
at Parser.exports.Parser.Parser.parseString (/<path-masked>/node_modules/xml2js/lib/xml2js.js:503:31)
at Parser.parseString (/<path-masked>/node_modules/xml2js/lib/xml2js.js:7:59)
at XmlToObj._transform (/<path-masked>/node_modules/xml-objects/index.js:22:10)
at XmlToObj.Transform._read (_stream_transform.js:167:10)
at XmlToObj.Transform._write (_stream_transform.js:155:12)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:287:5)
at XmlToObj.Writable.write (_stream_writable.js:215:11)
at XmlNodes.ondata (_stream_readable.js:536:20)
at emitOne (events.js:90:13)
at XmlNodes.emit (events.js:182:7)
at readableAddChunk (_stream_readable.js:153:18)
at XmlNodes.Readable.push (_stream_readable.js:111:10)
at XmlNodes.Transform.push (_stream_transform.js:128:32)
at XmlNodes._transform (/<path-masked>/node_modules/xml-nodes/index.js:23:10)
at XmlNodes.Transform._read (_stream_transform.js:167:10)
at XmlNodes.Transform._write (_stream_transform.js:155:12)
The error stack is huge and makes it hard to pinpoint where the problem is.
clocked0ne commented
Okay so it would appear the issue is based with gulp-cloudfront
and not this package, so I will close this issue.