jonkemp/gulp-inline-css

TypeError: undefined is not a function

ScottSmith95 opened this issue · 5 comments

(at DestroyableTransform.Readable.pipe)

I've tried updating my config and flushing node_modules but I'm unable to get this to work at all.

My setup is pretty simple.

gulp.task('inline', function() {
    return gulp.src('index.html')
        .pipe(inlineCSS)
        .pipe(gulp.dest('build/'));
});

Can you post the index.html file?

Sure, sorry about the length.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="viewport" content="width=device-width" />
        <title>*|MC:SUBJECT|*</title>
        <link rel="stylesheet" href="build/style.css">
    </head>
    <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <table border="0" cellpadding="0" cellspacing="0" class="templateContainer" style="width: 100%;">
                            <tr>
                                <td align="center" valign="top">
                                    <!-- BEGIN PREHEADER // -->
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templatePreheader">
                                        <tr>
                                            <td valign="top" class="preheaderContent" style="padding-top:10px; padding-right:0; padding-bottom:10px; padding-left:2.5%;" mc:edit="preheader_content00">
                                                This week's Brief Buzz
                                            </td>
                                            <!-- *|IFNOT:ARCHIVE_PAGE|* -->
                                            <td valign="top" width="180" class="preheaderContent" style="padding-top:10px; padding-right:2.5%; padding-bottom:10px; padding-left:0; text-align: right;" mc:edit="preheader_content01">
                                                <a href="*|ARCHIVE|*" target="_blank">View in your browser</a>
                                            </td>
                                            <!-- *|END:IF|* -->
                                        </tr>
                                    </table>
                                    <!-- // END PREHEADER -->
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <!-- BEGIN HEADER // -->
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateHeader">
                                        <tr>
                                            <td valign="top" class="headerContent" style="max-width:600px; padding: 0.5em 0;">
                                                <img src="http://img.scottshar.es/BMBuzz.png" width="300px" class="headerImage" mc:label="header_image" mc:edit="header_image" mc:allowdesigner mc:allowtext/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top" class="headerContent">
                                                <h2 mc:edit="week">
                                                    January 1-7
                                                </h2>
                                            </td>
                                        </tr>
                                    </table>
                                    <!-- // END HEADER -->
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <!-- BEGIN BODY // -->
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateBody">
                                        <tr mc:repeatable="section" mc:variant="normal" class="section normal">
                                            <td valign="middle" class="bodyContent" mc:edit="body_content">
                                                <h2>Header</h2>
                                                <p>Content goes here</p>
                                            </td>
                                        </tr>
                                        <tr mc:repeatable="section" mc:variant="color" class="section color">
                                            <td valign="middle" class="bodyContent" mc:edit="body_content">
                                                <h2>Header</h2>
                                                <p>Content goes here</p>
                                            </td>
                                        </tr>
                                    </table>
                                    <!-- // END BODY -->
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top">
                                    <!-- BEGIN FOOTER // -->
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateFooter">
                                        <tr>
                                            <td valign="top" class="footerContent logo">
                                                <img src="http://img.scottshar.es/BMLogo.png" class="footerImage" mc:label="footer_image" mc:edit="footer_image" mc:allowdesigner mc:allowtext />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top" class="footerContent" style="padding-top:0;" mc:edit="footer_content01">
                                                <em>Copyright &copy; *|CURRENT_YEAR|* *|LIST:COMPANY|*, All rights reserved.</em>
                                                <br />
                                                *|IFNOT:ARCHIVE_PAGE|* *|LIST:DESCRIPTION|*
                                                <br />
                                                <br />
                                                *|HTML:LIST_ADDRESS_HTML|* *|END:IF|*
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign="top" class="footerContent" style="padding-bottom:10px;" mc:edit="footer_content02">
                                                <a href="*|UNSUB|*">unsubscribe from this list</a>&nbsp;&nbsp;&nbsp;<a href="*|UPDATE_PROFILE|*">update subscription preferences</a>&nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                    <!-- // END FOOTER -->
                                </td>
                            </tr>
                        </table>
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>

Can you post the error log?

TypeError: undefined is not a function
    at DestroyableTransform.Readable.pipe (/Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:516:8)
    at Gulp.<anonymous> (/Users/Scott/Documents/Brief Media/Email/BriefBuzz/gulpfile.js:21:10)
    at module.exports (/Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
    at /Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/orchestrator/index.js:279:18
    at finish (/Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
    at /Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:52:4
    at f (/Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/node_modules/once/once.js:17:25)
    at DestroyableTransform.onend (/Users/Scott/Documents/Brief Media/Email/BriefBuzz/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/index.js:31:18)

And can you post your gulpfile.js?