Foundation-emails: npm start error; code ELIFECYCLE; gulp fails

Created on 21 Apr 2016  Â·  20Comments  Â·  Source: foundation/foundation-emails

I have installed foundation email using cli
I'm now running into the following error with 'npm start' and hoping someone can help put me right:

How can we reproduce this bug?
I am running:

  • MACOS X Version 10.6.8
  • npm 3.8.6  
  • node v4.4.2  
  • nvm 0.31.0
  • git version 1.8.4.2  

What did you expect to happen?
"npm start" to run without errors

What happened instead?

npm ERR! Darwin 10.8.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.4.2
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the foundation-emails-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs foundation-emails-template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls foundation-emails-template
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/fivedoor/Documents/development/zurb/foundation/test190416-2/npm-debug.log

The npm-debug.log here: http://pastebin.com/semQRmcR

I'm fairly new to node & npm and did run into a lot of issues and warnings during the install process of npm install foundation-cli --global 
Posted the install log here as I'm not sure if there's anything in there that sheds more light:
https://github.com/fivedoor/foundation-records/blob/master/installation_log_190416

gulp -v returns [19:52:03] CLI version 3.9.1
I was wondering if the problem might be connected to the fact that gulp referenced in the json file dev dependencies is v4.0?
"gulp": "git+https://github.com/gulpjs/gulp.git#4.0",

thanks

zurb stack

Most helpful comment

just do
npm rebuild node-sass

All 20 comments

Also getting this.

  • Node 5.10.1
  • npm 3.8.7
[] Requiring external module babel-register
/Email/gulpfile.babel.js:1
(function (exports, require, module, __filename, __dirname) { import gulp from 'gulp';
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at loader (/Email/node_modules/babel-register/lib/node.js:126:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Email/node_modules/babel-register/lib/node.js:136:7)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at execute (/Email/node_modules/gulp-cli/lib/versioned/^4.0.0-alpha.2/index.js:33:18)
    at Liftoff.handleArguments (/Email/node_modules/gulp-cli/index.js:150:63)

This is fixed by creating a .babelrc file in the project root directory with the following content:

{
  "presets": ["es2015"]
}

I'd make a PR but the branches are confusing and I'm not really sure what the target branch should be.

Thanks Shaun.
Unfortunately in my case the .babelrc file (with that content) was already created in the root folder and npm startstill errors.

The full error feedback as follows:

15:26:00] Failed to load external module babel-register
[15:26:00] Requiring external module babel-core/register
[15:26:18] Using gulpfile ~/Documents/development/zurb/foundation/test190416-2/gulpfile.babel.js
[15:26:18] Starting 'default'...
[15:26:18] Starting 'build'...
[15:26:18] Starting 'clean'...
[15:26:18] Finished 'clean' after 10 ms
[15:26:18] Starting 'pages'...
[15:26:19] Finished 'pages' after 644 ms
[15:26:19] Starting 'sass'...
[15:26:19] 'sass' errored after 156 ms
[15:26:19] Error: dlopen(/Users/fivedoor/Documents/development/zurb/foundation/test190416-2/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node, 1): Symbol not found: __ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info
  Referenced from: /Users/fivedoor/Documents/development/zurb/foundation/test190416-2/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node
  Expected in: flat namespace
 in /Users/fivedoor/Documents/development/zurb/foundation/test190416-2/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node
    at Error (native)
    at Object.Module._extensions..node (module.js:434:18)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/fivedoor/Documents/development/zurb/foundation/test190416-2/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:16:15)
    at Module._compile (module.js:409:26)
    at Module._extensions..js (module.js:416:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/fivedoor/Documents/development/zurb/foundation/test190416-2/node_modules/babel-core/node_modules/babel-register/lib/node.js:134:7)
[15:26:19] 'build' errored after 816 ms
[15:26:19] 'default' errored after 819 ms 

npm ERR! Darwin 10.8.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.4.2
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the foundation-emails-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs foundation-emails-template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls foundation-emails-template
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/fivedoor/Documents/development/zurb/foundation/test190416-2/npm-debug.log

@shaungrady A PR would help! The build template is stored here: https://github.com/zurb/foundation-emails-template

@rafibomb Strange. The template has a .babelrc file. But I didn't get that file when I initialized it. Not sure what went wrong...

@fivedoor You might try deleting your node_modules folder and running npm i

I didn’t exactly manage to solve the issue but I did find I could bypass it by running an updated OS.

I ended up doing a partition install to run el capitan and with the updated OS no longer encounter the issue.

Running the following with success:

  • MAC OS 10.11.4
  • npm 3.8.7
  • node v4.4.3
  • git 2.8.1

thanks

I was getting the exact same error until I realized a line in my scss was broken.

I realized that a line in my sass was broken too - would be really nice if this was built into the gulp file - an error message with source maps and line numbers

just do
npm rebuild node-sass

npm rebuild node-sass
Did worked for me!, i updated Node a few of weeks ago. Tnx @kongolml

Weird. I had a slash "/" in the name of the folder that contains the root foundation folder and got this error. Removed the slash and it all worked :)

I'm getting this error on a freshly downloaded version, basically just this:

git clone https://github.com/zurb/foundation-emails-template project
cd project
npm install
(... npm packages install...)
npm start

Failed at the [email protected] start script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the foundation-emails-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs foundation-emails-template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls foundation-emails-template
npm ERR! There is likely additional logging output above.

my system info:
OSX El Capitan 10.11.6
node -v 7.6.0
npm -v 3.10.3

Hey guys I just got some similar errors and I have no idea what is going on.
I tried methods you provided above but it looks like that they all cut no ice.
Would you please help me find out what is wrong with it.
Below are the errors.

ERR! errno 1
npm ERR! [email protected] dev: npm run stop:staticserver && node node_modules/webcube/tools/devServer.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'npm run stop:staticserver && node node_modules/webcube/tools/devServer.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the webapp-exercise package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run stop:staticserver && node node_modules/webcube/tools/devServer.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs webapp-exercise
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls webapp-exercise
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Usersadmin\AppData\Roaming\npm-cache_logs\2017-05-07T14_09_33_360Z-debug.log

None of the solutions here worked for me :(

npm -v
5.0.1

node -v
v7.10.0

OSX Latest.
> [email protected] start /Users/name/Documents/Web/Dev/emails.dev
> gulp

[15:26:43] Requiring external module babel-register
[15:26:46] Using gulpfile ~/Documents/Web/Dev/emails.dev/gulpfile.babel.js
/Users/ahmadawais/.nvm/versions/node/v7.10.0/lib/node_modules/gulp/bin/gulp.js:129
    gulpInst.start.apply(gulpInst, toRun);
                  ^

TypeError: Cannot read property 'apply' of undefined
    at /Users/name/.nvm/versions/node/v7.10.0/lib/node_modules/gulp/bin/gulp.js:129:19
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/name/.npm/_logs/2017-06-01T10_26_46_350Z-debug.log

I was having similar issues. It turned out, as with many others, it was a syntax error. My html had an erroneous tag in front of another tag and this caused the inlining feature to choke. Also, running 'foundation build' vs 'npm run build' solved many other issues. Everything's working well now.

  1. delete node_modules folder
  2. run npm install

A few people have suggested this, and I am commenting to add that this worked for me!

I was experiencing a similar issue. NPM start would work, but NPM run build would fail, so I couldn't export compressed production email pages. I got the ELIFECYCLE error:

[10:53:42] 'build' errored after 16 s [10:53:42] 'default' errored after 16 s npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build:gulp --production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/MacBookPro/.npm/_logs/2018-05-29T14_53_43_029Z-debug.log
P-Ts-MBP:FoundSass1 MacBookPro$
`
Then I noticed one comment that said his error was caused by a mistake in the scss, and I noticed I had started a class name with a numeral, so I fixed that, but it wasn't the issue. The issue seems to have been a junk html working file I had kept in the pages folder. You absolutely do not want to store working files in the pages folder! Now I can run npm run build.

I got this error when the subject line of my email contained the characters:
[ ]

When I removed them _npm run start_ ran again.

You probably just need to escape the characters.

On Tue, May 7, 2019 at 11:52 PM rebeccode notifications@github.com wrote:

I got this error when the subject line of my email contained the
characters:
[ ]

When I removed them npm run start ran again.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/zurb/foundation-emails/issues/377#issuecomment-490337093,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAE4UJC6YT36KKZ2PRJ7PH3PUJE7LANCNFSM4CBT6YCQ
.

Was this page helpful?
0 / 5 - 0 ratings