Menu icon Foundation
$ npm run build fails

Hi,

Everytime I try to run the 'npm run build', I get the following error:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@2.14.4
3 info using node@v4.1.2
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild foundation-zurb-template@1.0.0
6 info build foundation-zurb-template@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info foundation-zurb-template@1.0.0 Failed to exec build script
9 verbose stack Error: foundation-zurb-template@1.0.0 build: `gulp build --production`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:818:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid foundation-zurb-template@1.0.0
11 verbose cwd /Users/wouter/Yeti/whatever
12 error Darwin 14.5.0
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
14 error node v4.1.2
15 error npm  v2.14.4
16 error code ELIFECYCLE
17 error foundation-zurb-template@1.0.0 build: `gulp build --production`
17 error Exit status 1
18 error Failed at the foundation-zurb-template@1.0.0 build script 'gulp build --production'.
18 error This is most likely a problem with the foundation-zurb-template package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     gulp build --production
18 error You can get their info via:
18 error     npm owner ls foundation-zurb-template
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
 

I used Yeti Launch to start with the the Zurb advanced template. Can anyone help me out here?

Thanks!

npmerrorbuildprodproduction

Hi,

Everytime I try to run the 'npm run build', I get the following error:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@2.14.4
3 info using node@v4.1.2
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild foundation-zurb-template@1.0.0
6 info build foundation-zurb-template@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info foundation-zurb-template@1.0.0 Failed to exec build script
9 verbose stack Error: foundation-zurb-template@1.0.0 build: `gulp build --production`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:818:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid foundation-zurb-template@1.0.0
11 verbose cwd /Users/wouter/Yeti/whatever
12 error Darwin 14.5.0
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
14 error node v4.1.2
15 error npm  v2.14.4
16 error code ELIFECYCLE
17 error foundation-zurb-template@1.0.0 build: `gulp build --production`
17 error Exit status 1
18 error Failed at the foundation-zurb-template@1.0.0 build script 'gulp build --production'.
18 error This is most likely a problem with the foundation-zurb-template package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     gulp build --production
18 error You can get their info via:
18 error     npm owner ls foundation-zurb-template
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
 

I used Yeti Launch to start with the the Zurb advanced template. Can anyone help me out here?

Thanks!

Christy over 2 years ago

gah same thing happens to me

Wouter Deloof over 2 years ago

I made it work by doing this using the Command Line Interface: running

npm install babel-register

in the directory where you installed Foundation using the CLI. After that I updated everything involved in the npm run build process, one by one. It's not an easy process and it takes a while, but in the end it worked for me.

After everything was updated, it worked for me, but any javascript I had on the page, didn't work anymore.

If this happens to you too, then you need the find the following line in the gulpfile.babel.js file in your Foundation directory and comment it out:

.pipe($.if(PRODUCTION, $.uncss(UNCSS_OPTIONS)))

But I believe it's commented out in the most recent version of Foundation.