foundation-emails: Error while inlining for production

Hello,

I have created a new project with ink mail. All is good while running npm start but when I try to run npm run build, build fail 😢

Previous projects were running fine. Here are the version used in this project :

  • MAC OS El Capitan 10.11.6
  • Node 5.1.1
  • NPM 3.7.2
  • Foundation CLI 2.1.0
  • Foundation Email 2.2.1

And the log from NPM npm-debug.txt

Bonus track, debug from terminal:

'sass' errored after 5.03 s
Error in plugin 'gulp-uncss'
Message:
    Unexpected EOF
Details:
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false

Any help would be appreciated 😄

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 21 (3 by maintainers)

Most upvoted comments

Yes to weird characters. Over here we’ve increasingly been finding weird characters coming in when copying from Sketch or Zeplin or Google Docs or Word. After a lot of pain, I finally found StringEncode for Sublime: https://packagecontrol.io/packages/StringEncode

This package allows you to highlight a block of text, then hit “Safe HTML Entitize” - it will catch any special characters and convert them to their HTML code.

It is an extremely useful package for finding “weird characters” that are breaking your build process, or showing up funny on certain OS / Browser combinations.

Update

When commenting this code :

    .pipe($.if(PRODUCTION, $.uncss(
      {
        html: ['dist/**/*.html']
      })))

Everything works fine 😕

It was in some text (in the html) that I had copied and pasted in from somewhere else. After hunting down the weird whitespace character (not visible in my editor) and removing it, the build was able to complete successfully.

I used this online tool to fix my non-ascii characters.

If you’re using VS Code, and running into bad character issues, I recommend using the extension “Highlight Bad Chars”: https://marketplace.visualstudio.com/items?itemName=wengerk.highlight-bad-chars .

I configured this extension to always highlight bad characters with an obnoxious pink color that is impossible to miss. Works great, you see them right away, and can convert them to an HTML equivalent.

I can confirm, that this problem was caused by weird characters (unicode \2028) in my html files.