Skip to content

TypeError: Cannot read property 'toString' of null #45

@g1un

Description

@g1un

Sometimes have this error.

D:\test\amrest-app\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 typeMap.img.template (D:\test\amrest-app\node_modules\gulp-inline\index.js:50:61)
    at Transform._transform (D:\test\amrest-app\node_modules\gulp-inline\index.js:211:20)
    at Transform._read (D:\test\amrest-app\node_modules\gulp-inline\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:184:10)
    at Transform._write (D:\test\amrest-app\node_modules\gulp-inline\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:172:12)
    at doWrite (D:\test\amrest-app\node_modules\gulp-inline\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:237:10)
    at writeOrBuffer (D:\test\amrest-app\node_modules\gulp-inline\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:227:5)
    at Transform.Writable.write (D:\test\amrest-app\node_modules\gulp-inline\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:194:11)
    at write (D:\test\amrest-app\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:623:24)
    at flow (D:\test\amrest-app\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:632:7)
    at DestroyableTransform.pipeOnReadable (D:\test\amrest-app\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:664:5)

Fixed only after several remove/install node_modules, rebootings.
My gulpfile.js: https://github.com/g1un/amrest-app/blob/master/gulpfile.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions