kaiqigong / gulp-cdnify

A gulp plugin that converts local URLs to CDN ones.
17 stars 9 forks source link

TypeError: Cannot read property 'start' of undefined #8

Closed tobyforever closed 8 years ago

tobyforever commented 9 years ago

the process is terminated halfway looks like some malformed source file but the stacktrace didn't tell. Anyway I can fix this?

[09:42:46] Changed HTML file: "c:\wamp\www\2.0_dist_tmp\js\couponListAll.e83a3cea.js" [09:42:46] Changed HTML file: "c:\wamp\www\2.0_dist_tmp\js\date.a7536e5a.js" [09:42:46] Changed HTML file: "c:\wamp\www\2.0_dist_tmp\js\DOMWindow.509189ec.js" c:\wamp\www\node_modules\gulp-cdnify\node_modules\soup\lib\soup.js:62 if (correspondingOpeningTag.start === 1 && _this._string.charAt(1) ! ^ TypeError: Cannot read property 'start' of undefined at Object.htmlparser.Parser.onclosetag (c:\wamp\www\node_modules\gulp-cdnify\node_modules\soup\lib\soup.js:62:38) at Parser.onend (c:\wamp\www\node_modules\gulp-cdnify\node_modules\soup\node_modules\htmlparser2\lib\Parser.js:274:14) at Tokenizer.end (c:\wamp\www\node_modules\gulp-cdnify\node_modules\soup\node_modules\htmlparser2\lib\Tokenizer.js:813:12) at Parser.end (c:\wamp\www\node_modules\gulp-cdnify\node_modules\soup\node_modules\htmlparser2\lib\Parser.js:306:18) at Soup.module.exports.Soup._build (c:\wamp\www\node_modules\gulp-cdnify\node_modules\soup\lib\soup.js:81:12) at Soup.module.exports.Soup.setAttribute (c:\wamp\www\node_modules\gulp-cdnify\node_modules\soup\lib\soup.js:110:10) at DestroyableTransform._transform (c:\wamp\www\node_modules\gulp-cdnify\index.js:119:26) at DestroyableTransform.Transform._read (c:\wamp\www\node_modules\gulp-cdnify\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:184:10) at DestroyableTransform.Transform._write (c:\wamp\www\node_modules\gulp-cdnify\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:172:12) at doWrite (c:\wamp\www\node_modules\gulp-cdnify\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:237:10)

Process finished with exit code 1

kaiqigong commented 8 years ago

Hi @tobyforever this gulp tool can only convert html and css files. It is not designed for js. You can try gulp-relpace