Foundation build error

2.9k Views Asked by At

Cannon find the solution for a long period of time. When I use foundation watch everything is great, but every time I try to use foundation build I see this error:

[21:05:45] 'sass' errored after 5.91 s
[21:05:45] Error in plugin 'gulp-uncss'
Message:
    Unexpected EOF
Details:
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false
[21:05:45] 'build' errored after 6.31 s
[21:05:45] 'default' errored after 6.31 s
Error: [email protected] build: `gulp --production`
Exit status 1
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:217:16)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:194:7)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

I also tried to delete the folder node_modules and install it again but nothing helps. How to fix it?

2

There are 2 best solutions below

0
On

I've experienced this in the past. There are two known issues that I'm aware of that result in this type of error.

  1. Odd white spaces, or characters in your html files. Usually from a copy and paste command from elsewhere. See this issue for reference: https://github.com/zurb/foundation-emails/issues/637

  2. An outdated version of node itself. Try updating your node version, then deleting node_modules from your project and running npm install in your project directory.

0
On

To further what Grant said, you can search for special characters in your text editor to make them easier to spot. If you're using Sublime Text 3 for example, you can select all non-ASCII characters with the following regex:

[^\x00-\x7F]

Clicking 'Find All' (with Regular Expression search enabled) will highlight all the white spaces and special characters.

Ref: is there a way to highlight all the special accent characters in sublime text or any other text editor?