Menu icon Foundation
foundation-apps new myApp Error on line 130

2014 12 05 1807

I ran foundation-apps new myApp and found it got jammed on line 130 of foundationCLI.js

Find line 129 and line 130 attached.

I have installed other packages with npm and know that it is there and working. What else should I be checking?

    exec(npmInstall, {cwd: './'+args[0]}, function(err, out, code) {
      if (err instanceof Error) throw err;
            

         

foundation for appsinstallerror

2014 12 05 1807

I ran foundation-apps new myApp and found it got jammed on line 130 of foundationCLI.js

Find line 129 and line 130 attached.

I have installed other packages with npm and know that it is there and working. What else should I be checking?

    exec(npmInstall, {cwd: './'+args[0]}, function(err, out, code) {
      if (err instanceof Error) throw err;
            

         
Jacob Foster about 5 years ago

Getting the same error as you. Here is my output:

 F:\Sandbox\FoundationForApps>foundation-apps new myApp

           /|
          | |  /| .
     .  /\|  \/ |/|
     |\/          |
     ||\__/\____/||         Thanks for using Foundation for Apps!
  ___|| ======== ||___      -------------------------------------
 /___||  O    O  ||___\     Let's set up a new project.
     ||  ______, ||         It shouldn't take more than a minute.
     /|          |\
    /_/\\/\  /\//\_\
        \/\\//\/
           \/


Downloading the Foundation for Apps template...
Done downloading!

Installing dependencies...
npm  =>  bower  =>  bundler
C:\Users\Jacob\AppData\Roaming\npm\node_modules\foundation-cli\lib\foundationCLI.js:130
      if (err instanceof Error) throw err;
                                      ^
Error: spawn ENOENT
    at errnoException (child_process.js:998:11)
    at Process.ChildProcess._handle.onexit (child_process.js:789:34)

Egor about 5 years ago

same error

Ben Norman about 5 years ago

OK, I got past my first error.
I found a post at http://stackoverflow.com/questions/17516772/using-nodejss-spawn-causes-unknown-option-and-error-spawn-enoent-err

So I ended up changing the foundationCLI.js file like so
Replace Line 94:
var npmInstall = ['npm.cmd', 'install'];
Replace Line 95:
var bowerInstall = ['bower.cmd', 'install'];
Replace Line 96:
var bundleInstall = ['bundle.bat'];
Replace Line 159:
exec(['bower.cmd', 'update', '--production', '--ansi'], function(err, out, code) {
Replace Line 178:
var proc = spawn('npm.cmd', cmd);

This gets the "foundation-apps new myApp" command to work.

However, when I run "foundation-apps watch", I get an error in event.js

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)

Rafi Benkual about 5 years ago

This is a known issue on Windows and node. We are working on it. Thanks!

Narration ZF about 5 years ago

Here's a post that may help some of us. It did the original questioner on stackoverflow, though it didn't help me.

http://stackoverflow.com/questions/27308023/foundationcli-enoent-when-creating-a-new-project

I think it's pretty unconscionable for Zurb to post code they haven't tested on Windows. Not to say silly.

Now I know why so little works on each release, until we troubleshoot and individually spend all the time to make workarounds, or weeks go by.

If they did test, they'd realize that there are differences between stacks available to install, and handle them.

I remain very uncertain whether to get so involved with Zurb, just because of this continuous carelessness.

The question of earlier platforms? At least there, you could keep using the earlier Zurbs, and they seem to have woken up about workarounds for the 'all the kool kids' syndrome in some other cases.

It's not all marketing, boys. You have to have substance, and the jury is still out as far as I can see on your behavior there.

There are things like Susy, compass, and otherwise choosing your own tools.

Kevin Mitchell about 5 years ago

For what it's worth, I'm on Ubuntu 14.04 and have this issue. I'm using ZSH if that matters.

Narration ZF about 5 years ago

Ok! I noticed on another thread that someone is trying to fix this.

I reinstalled foundation-cli, and this got a new, modified copy of foundation-cli.js, and I think of some other important files.

This still did not work, but failed at a different point: the bundler run.

I experimented to see what bundler command was actually available, and found that bundler.bat was.

I changed line 97 of founmdation-cli.js as follows, to suit:

var bundleInstall = ['bundle.bat'];

Now everything works. I could run foundation-apps new myApp, and then after, go to the myApp folder and successfully run foundation-apps watch, which compiled all.

Have to run, or would put in more detail, but hopefully this gets others going on a Friday evening.

Cheers!

Oliver Gasser about 5 years ago

Hi all, the foundation-cli does also throw error on Mac OS X Yosemite at line 131:

Installing dependencies...
npm => bower => bundler
/usr/local/lib/node_modules/foundation-cli/lib/foundationCLI.js:131
if (err instanceof Error) throw err;
^
Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)

Doing the install process described on github https://github.com/zurb/foundation-apps-template works.

Darek Wędrychowski about 5 years ago

Updating foundation-cli unfortunately didn't help to solve the problem on Lubuntu 14.04.

Cole Futch about 5 years ago

I can confirm that Narration ZF's method will work...

At least there were no errors when running the setup for foundation-apps new method.

Martin Polley about 5 years ago

I'm having the same problem, but the suggested solution of appending .cmd didn't help :(

Rafi Benkual about 5 years ago

@Narration ZF Thanks for posting your solution. We do test the CLI on Windows and Mac. I'm sure you understand that when developing something like this, is is very difficult to account for all the different machines and configurations.

john about 5 years ago

Hi Rafi,

I can't get this to work.
I've spent hours in vain trying to fix this.

Can you please please please write up an official workaround or solution?

Paul J about 5 years ago

just installed foundation-cli on a windows 8.1 and am getting this similar error when trying to create an app via foundation-apps new myApp

Nando Boronat about 5 years ago

Still the same... It doesn't work for me.
One question... I copied the demo files (HTML, CSS,...) and I'm editing the code directly.
What's wrong with that?
Everything works fine and I will have enough problems integrating ASPX code and HighCharts.js.

Darek Wędrychowski almost 5 years ago

@Nando Boronat

It's not wrong. It just doesn't let you to use true power of the framework with SASS and stuff, also makes it difficult to keep things clean when developing and later maintaining big projects, making it slower and more irritating.

Cirox almost 5 years ago

As Oliver Gasser said:
the install process linked here (git clone https://github.com/zurb/foundation-apps-template.git app) solves the problem.
I am on Mac with Yosemite

Ziggi almost 5 years ago

Well, in my case the cause of "line 130 error" blocking foundation-apps from installation was a minor problem with GIT.

Actually, the process git-remote-https.exe was calling libcurl.dll in the system32 folder what was of inappropriate version. Coping files:

libcrypto.dll, libcurl.dll, and libssl.dll

from C:\Program Files (x86)\Git\bin to C:\Program Files (x86)\Git\libexec\git-core fixed the issue.

(Windows 7x64)