Foundation-emails: npm start errors after first run

Created on 5 Apr 2016  路  5Comments  路  Source: foundation/foundation-emails

How can we reproduce this bug?
I installed according to the getting started guide on your site.
[http://foundation.zurb.com/emails/docs/sass-guide.html]

When I run npm start the first time, all is working as expected.

Once I close this watch function, and try to restart it, the startup errors out.

 [email protected] start C:\dev\email-generator\cfiiemailtemplate
s
> gulp

[08:31:40] Failed to load external module babel-register
[08:31:40] Requiring external module babel-core/register
[08:31:47] Using gulpfile C:\dev\email-generator\cfiiemailtemplates\gulpfile.babe
l.js
...
[08:24:08] Starting 'inline'...
[08:24:08] 'inline' errored after 2.41 ms
[08:24:08] Error: ENOENT: no such file or directory, open 'C:\dev\email-generator
\cfiiemailtemplates\dist\css\app.css'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at inliner (gulpfile.babel.js:94:16)
    at inline (gulpfile.babel.js:72:28)
    at bound (domain.js:287:14)
    at runBound (domain.js:300:12)
    at asyncRunner (C:\dev\email-generator\cfiiemailtemplates\node_modules\gulp\n
ode_modules\undertaker\node_modules\bach\node_modules\async-done\index.js:36:18)
    at nextTickCallbackWith0Args (node.js:456:9)
    at process._tickDomainCallback (node.js:426:13)
[08:24:08] 'build' errored after 1.17 s
[08:24:08] 'default' errored after 1.17 s
Error: [email protected] start: `gulp`
Exit status 1
    at EventEmitter.<anonymous> (C:\node\node_modules\foundation-cli\node_modules
\npm\lib\utils\lifecycle.js:217:16)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at ChildProcess.<anonymous> (C:\node\node_modules\foundation-cli\node_modules
\npm\lib\utils\spawn.js:24:14)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:821:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5

What did you expect to happen?

  • I expected the browsersync server to start up and the gulp watch function to start.

What happened instead?

  • error and the process exits

What email clients does this happen in?

  • na

NPM debug log
npm-debug.log.txt

zurb stack

Most helpful comment

After a bit more troubleshooting. This is only a problem when I install via foundation new --framework emails. I have foundation cli installed globally.

If I grab the repo @https://github.com/zurb/foundation-emails-template, and run npm i the functionality works as expected and the error above does not occur.

All 5 comments

After a bit more troubleshooting. This is only a problem when I install via foundation new --framework emails. I have foundation cli installed globally.

If I grab the repo @https://github.com/zurb/foundation-emails-template, and run npm i the functionality works as expected and the error above does not occur.

Every time I create a project (email or website) using the foundation new command, when I run foundation watch this exception is raised: Failed to load external module babel-register

To avoid this exception I run manually npm install babel-register at the end of each project setup.

Every time I create a project (email or website) using the foundation new command, when I run foundation watch this exception is raised: Failed to load external module babel-register

This can be ingored as it is not an error.

What about the initial issue? Does this still occur?

I just ran into this issue, it turns out that it was a typo in one of my SCSS stylesheets (missing semicolon). Just posting here for future reference.

Closing as we did not receive any further feedback.

Was this page helpful?
0 / 5 - 0 ratings