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?
I've experienced this in the past. There are two known issues that I'm aware of that result in this type of error.
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
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.