Menu icon Foundation
Foundation Build Command Error on CLI

Hi guys! Loving Foundation 6 so far. I've successfully installed Foundation CLI on my Windows machine. My only problem is, the build (foundation build) command doesn't work for me. It says Error: Missing script: build

Am I missing something? Thank you very much!

cliSassCommand Linewindowsscss

Hi guys! Loving Foundation 6 so far. I've successfully installed Foundation CLI on my Windows machine. My only problem is, the build (foundation build) command doesn't work for me. It says Error: Missing script: build

Am I missing something? Thank you very much!

Stuart G over 3 years ago

I have the same issue as well since upgrading to Foundation CLI v2.0.0.

Other version details are:
{ 'foundation-apps-template': '1.1.0',
npm: '3.3.6',
ares: '1.10.1-DEV',
http_parser: '2.5.0',
icu: '56.1',
modules: '47',
node: '5.0.0',
openssl: '1.0.2d',
uv: '1.7.5',
v8: '4.6.85.28',
zlib: '1.2.8' }

Stuart G over 3 years ago

There's definitely a defect in one of the CLI 2.0 js files. I tried to revert to the previous version with:
Uninstall CLI 2.0:
npm uninstall -g foundation-cli

Install working version 1.1.0:
npm install -g foundation-cli@1.1.0

'build' works now, but 'watch' is broken, even with new projects. So I'll start with a clean slate and will un-install and re-install all the components (gulp, bower, nodejs etc).

Hope you had more luck Oliver

Stuart G over 3 years ago

Finally got it to work again. Seems there's a bug in the CLI 2.0 onwards. The fix has been committed but not released yet. Use the info on this page to implement a temporary fix: https://github.com/zurb/foundation-cli/issues/16

In short, change the scripts section in your project's package.json file to:
"scripts": {
"start": "gulp",
"build": "gulp sass"
},