Giter Club home page Giter Club logo

Comments (3)

g1un avatar g1un commented on July 23, 2024 1

In my case this problem begins with img with no src, but doesn't fix after adding this attribute, as if something has been broken in plugin after first wrong start. It takes place both on ubuntu 14.04 and windows 7.
I've found acceptable decision for this project. I've added 'img' to disabledtypes, so now this bug doesn't appear any more.
disabledTypes: ['js', 'css', 'img'],

from gulp-inline.

bebo-dot-dev avatar bebo-dot-dev commented on July 23, 2024

Exactly the same problem started to appear here out of nowhere. I'm running on linux mint:

joe@joes-HP-EliteBook-8470p ~/eclipseWorkspace/iD8266 $ gulp
[07:37:51] Using gulpfile ~/eclipseWorkspace/iD8266/gulpfile.js
[07:37:51] Starting 'clean'...
[07:37:51] Starting 'files'...
[07:37:51] Starting 'inline'...
[07:37:51] Finished 'clean' after 89 ms
[07:37:54] Finished 'files' after 3.57 s
/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/index.js:50
      el.attr('src', 'data:image/unknown;base64,' + contents.toString('base64'))
                                                            ^

TypeError: Cannot read property 'toString' of null
    at template (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/index.js:50:61)
    at Transform._transform (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/index.js:202:20)
    at Transform._read (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Transform._write (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at Transform.Writable.write (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at write (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/node_modules/readable-stream/lib/_stream_readable.js:623:24)
    at flow (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/node_modules/readable-stream/lib/_stream_readable.js:632:7)
    at Transform.pipeOnReadable (/home/joe/eclipseWorkspace/iD8266/node_modules/gulp-inline/node_modules/readable-stream/lib/_stream_readable.js:664:5)
joe@joes-HP-EliteBook-8470p ~/eclipseWorkspace/iD8266 $ 

from gulp-inline.

bebo-dot-dev avatar bebo-dot-dev commented on July 23, 2024

Fixed. Looking at https://github.com/ashaffer/gulp-inline/blob/master/index.js#L50 gave me a clue where it was going wrong. This line of code exists to inline img tags and it doesn't like img tags that don't have a src attribute..in short, I broke this by way of my own broken invalid html markup.

Fixed by changing:

<img id="totpQrCode" alt="totpQrCode" class="form-control totpQrCode" />

to

<img id="totpQrCode" alt="totpQrCode" class="form-control totpQrCode" src="#" />

..in one of my html docs

from gulp-inline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.