Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError running gulp #16

Open
jcass77 opened this issue Mar 26, 2018 · 5 comments
Open

TypeError running gulp #16

jcass77 opened this issue Mar 26, 2018 · 5 comments

Comments

@jcass77
Copy link

jcass77 commented Mar 26, 2018

I started with a fresh clone of the repository and received the following TypeError when running gulp.

Unhandled rejection TypeError: __html.replace is not a function
    at /Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/list-stylesheets/index.js:27:33
    at Array.forEach (<anonymous>)
    at encodeCodeBlocks (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/list-stylesheets/index.js:24:33)
    at encodeEntities (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/list-stylesheets/index.js:45:20)
    at module.exports (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/list-stylesheets/index.js:52:22)
    at module.exports (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/extract-css/index.js:11:16)
    at /Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/inline-css/lib/inlineContent.js:15:9
    at tryCatcher (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._resolveFromResolver (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/bluebird/js/main/promise.js:483:31)
    at new Promise (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/bluebird/js/main/promise.js:71:37)
    at inlineContent (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/inline-css/lib/inlineContent.js:8:12)
    at /Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/inline-css/index.js:27:9
    at tryCatcher (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._resolveFromResolver (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/bluebird/js/main/promise.js:483:31)
    at new Promise (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/bluebird/js/main/promise.js:71:37)
    at module.exports (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/inline-css/index.js:8:12)

Changing the gulp-inline-css devDependency from git+https://git@github.com/centralcollegenottingham/gulp-inline-css.git to ^3.3.0 seems to have resolved the issue.

@jamesmacwhite
Copy link
Contributor

Hi. There is a reason why a bespoke version of gulp-inline-css is used, because it has a few bugs/quirks in it, which I fixed but didn't go to upstream. I'll certainly have a look and see what the issue is.

@jamesmacwhite
Copy link
Contributor

jamesmacwhite commented Mar 26, 2018

I have rm -rf node_modules and ran npm i again, then tested gulp and it worked OK. Can you confirm your node/npm version?

I'm running:

Node: v6.3.0
npm: 5.3.0

Edit: You may want to try testing the develop branch, the issues might be occurring on the master branch, which is quite old. If that's the issue I'll do a merge.

@jcass77
Copy link
Author

jcass77 commented Mar 26, 2018

Currently running:

Node v9.6.1
npm: 5.8.0

Issue also occurs with Node LTS version:

Node v8.10.0
npm 5.6.0

Same issues occur on the 'develop' branch, which I am currently using.

@jamesmacwhite
Copy link
Contributor

That's strange, I can't replicate the issue here at all. Can you let me know the specific task this error is thrown after. I'd imagine, its likely one of the CSS related gulp tasks.

@jcass77
Copy link
Author

jcass77 commented Mar 26, 2018

Full trace below:

schopenhauer:HTML-Email-Boilerplate-Redux jcass$ ./node_modules/.bin/gulp 
[12:37:37] Using gulpfile ~/PhpstormProjects/HTML-Email-Boilerplate-Redux/gulpfile.js
[12:37:37] Starting 'clean'...
[12:37:37] Finished 'clean' after 20 ms
[12:37:37] Starting 'git-rev-info'...
[12:37:37] Finished 'git-rev-info' after 19 ms
[12:37:37] Starting 'build-html-samples'...
Unhandled rejection TypeError: __html.replace is not a function
    at /Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/list-stylesheets/index.js:27:33
    at Array.forEach (<anonymous>)
    at encodeCodeBlocks (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/list-stylesheets/index.js:24:33)
    at encodeEntities (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/list-stylesheets/index.js:45:20)
    at module.exports (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/list-stylesheets/index.js:52:22)
    at module.exports (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/extract-css/index.js:11:16)
    at /Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/inline-css/lib/inlineContent.js:15:9
    at tryCatcher (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._resolveFromResolver (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/bluebird/js/main/promise.js:483:31)
    at new Promise (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/bluebird/js/main/promise.js:71:37)
    at inlineContent (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/inline-css/lib/inlineContent.js:8:12)
    at /Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/inline-css/index.js:27:9
    at tryCatcher (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._resolveFromResolver (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/bluebird/js/main/promise.js:483:31)
    at new Promise (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/bluebird/js/main/promise.js:71:37)
    at module.exports (/Users/jcass/PhpstormProjects/HTML-Email-Boilerplate-Redux/node_modules/gulp-inline-css/node_modules/inline-css/index.js:8:12)

The only thing I'm doing differently that I can think of is that I did not install gulp globally, and that I am using nvm to mange node.js versions on OSX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants