Comments (3)
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.
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.
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)
- Multiple js/css transforms? HOT 1
- how to skip some js/css files? HOT 2
- Could I set inline or not inline in the file link? HOT 3
- Add synchronous method HOT 2
- Stay attributes HOT 2
- add cache option
- When I use gulp-inline for Freemarker
- How about <object> ? HOT 5
- Support user-defined custom tags in `typeMap` HOT 1
- js and css plugin options HOT 1
- Inline
- Gulp inline changing case of custom attributes in HTML markup HOT 1
- SVG elements are not being inlined HOT 1
- svg inline is altering html and php markup HOT 1
- HTMLmin
- Support RegEx for ignored files HOT 1
- css url paths not changed
- Problem with non-value attributes?
- Remove gulp-util from dependecies.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-inline.