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
Check out my project containing a gulpfile.js using this library: git clone https://github.com/cristim/img-to-base64-html-converter.git
cd img-to-base64-html-converter && npm install
Save a website which contains spaces in the file name, the easiest is to use the above URL, and save the page to the same directory, using the "Save as" context menu(I did it in Chrome).
running gulp in the same directory would return this error
[23:25:18] Using gulpfile /tmp/test/img-to-base64-html-converter/gulpfile.js
[23:25:18] Starting 'default'...
[23:25:18] Finished 'default' after 12 ms
mtype: application/octet-stream
mtype: application/octet-stream
mtype: image/gif
/tmp/test/img-to-base64-html-converter/cristim_img-to-base64-html-converter_%20Converts%20external%20images%20referenced%20from%20an%20HTML%20file%20into%20inlined%20base64%20img%20tags_files/octocat-spinner-32.gif image/gif
fs.js:640
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open '/tmp/test/img-to-base64-html-converter/cristim_img-to-base64-html-converter_%20Converts%20external%20images%20referenced%20from%20an%20HTML%20file%20into%20inlined%20base64%20img%20tags_files/octocat-spinner-32.gif'
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at .<anonymous> (/tmp/test/img-to-base64-html-converter/node_modules/gulp-img64/index.js:37:23)
at exports.each (/tmp/test/img-to-base64-html-converter/node_modules/cheerio/lib/api/traversing.js:226:24)
at Transform._transform (/tmp/test/img-to-base64-html-converter/node_modules/gulp-img64/index.js:27:13)
at Transform._read (/tmp/test/img-to-base64-html-converter/node_modules/gulp-img64/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Transform._write (/tmp/test/img-to-base64-html-converter/node_modules/gulp-img64/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/tmp/test/img-to-base64-html-converter/node_modules/gulp-img64/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (/tmp/test/img-to-base64-html-converter/node_modules/gulp-img64/node_modules/readable-stream/lib/_stream_writable.js:227:5)
Apparently the spaces in the file name get escaped, which causes the failure.
Prepending file:// to the same string may fix it.
The text was updated successfully, but these errors were encountered:
cristim
added a commit
to cristim/gulp-img64
that referenced
this issue
Oct 11, 2016
Steps to reproduce
git clone https://github.com/cristim/img-to-base64-html-converter.git
cd img-to-base64-html-converter && npm install
Apparently the spaces in the file name get escaped, which causes the failure.
Prepending
file://
to the same string may fix it.The text was updated successfully, but these errors were encountered: