Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Error installing foundation-cli on Windows #203

Closed
jsmreese opened this issue Dec 4, 2014 · 67 comments
Closed

Error installing foundation-cli on Windows #203

jsmreese opened this issue Dec 4, 2014 · 67 comments

Comments

@jsmreese
Copy link

jsmreese commented Dec 4, 2014

I see this error when I run npm install -g foundation-cli on Windows (Windows 7 64bit):

image

@gerrytucker
Copy link

Same here on Windows 8.1 64-bit.

@gakimball
Copy link
Contributor

I'll look into it, but thankfully that step of the process is just a welcome message—it doesn't set anything up.

@jsmreese
Copy link
Author

jsmreese commented Dec 4, 2014

@gakimball It might not set anything up, but I'm still unable to use the cli after that step.
foundation-apps new myApp just returns sh: foundation-apps: command not found.
Not sure if I'm missing something obvious...

@peterblazejewicz
Copy link
Contributor

@gakimball will this help?
roots/sage@97f5f34
something like:

"postinstall": "node lib/welcome.js"

@gakimball
Copy link
Contributor

That might work. Also, the source code for the CLI is here, in case anyone who knows more about Node than me can help :)

https://github.com/zurb/foundation-cli

@gakimball
Copy link
Contributor

@jsmreese I can see in your screenshot that it's connecting the CLI's main JavaScript file to a command on your system (C:\Users\John...\npm\foundation-apps), is that command there at that path?

@gakimball gakimball added cli and removed javascript labels Dec 4, 2014
@dhye360
Copy link

dhye360 commented Dec 4, 2014

Same problem here on windows as admin. Error must interrupt install as foundation-apps isn't found installed locally or globally.

@jsmreese do you have Ruby? I was trying to get as far as I could without it, but if it won't even install....

@gakimball
Copy link
Contributor

@peterblazejewicz I implemented your fix, which should solve the problem.

npm update -g foundation-cli

@gerrytucker
Copy link

Now working after 1.0.2 update, thanks very much everyone!

@gakimball
Copy link
Contributor

Awesome! @jsmreese @dhye360 @peterblazejewicz let me know if it works for y'alls.

@gerrytucker
Copy link

I spoke too soon!

image

@benjaminzanatta
Copy link

Same for me on Windows 7 64bits

capture

@dhye360
Copy link

dhye360 commented Dec 4, 2014

@gakimball Same error as @gerrytucker for me

@gakimball
Copy link
Contributor

Alright, I'll look into it. Thanks so much for being helpful and patient, guys :)

In the mean time, you can do what the installer does by hand:

npm install
bower install
bundle

@gerrytucker
Copy link

Had to downgrade my Sass gem to 3.4.7 before I could complete the manual commands but now have a newly created app :-)

@nandroid
Copy link

nandroid commented Dec 5, 2014

Same error. I don't know how to downgrade...

@FlatspinZA
Copy link

I tried everything - the only way I could get this working was the manual installation, and that was after having to sort my SSL certificates to install the Bundler gem.

Thanks for the help, guys.

@gerrytucker
Copy link

@nandroid Which version of the Sass gem do you have? gem list sass

To install Sass@3.4.7:

gem install sass -v "3.4.7"

I was on sass@3.4.9 which I uninstalled as follows:

gem uninstall sass -v "3.4.9"

Hope this helps.

Gerry

@cjwilson252
Copy link

I've managed to get it running by downgrading my sass to 3.4.7 and it worked, thanks gerrytucker .

@dhye360
Copy link

dhye360 commented Dec 5, 2014

I caved and installed Ruby, but gem install bundler doesn't work so while I could install foundation for apps; I can't successfully bootstrap one

but i'm Ruby/Sass ignorant and an overall foundation N00B

@gerrytucker
Copy link

@dhye360 ensure you've got the sass gem installed, required version as mentioned above is 3.4.7:

gem install sass -v "3.4.7"

@AntJanus
Copy link
Contributor

AntJanus commented Dec 5, 2014

@gakimball I fixed 2/3rd of the commands so that most of them should work now. The problem is on the Node side (or perhaps Windows side?) where exec only runs executables, not scripts or whatever else. For some reason npm works with npm.cmd and bower works with bower.cmd. However, I couldn't get bundle to work at all. I'm not a 100% sure why.

I noticed that the gulp-ruby-sass package uses win spawn which allows for cross-platform exec and spawn. I'll give regular spawn a shot as it might work better.

@jsmreese
Copy link
Author

jsmreese commented Dec 5, 2014

I had both sass 3.4.7 and 3.4.9 installed.
Uninstalled both, reinstalled 3.4.7.

Almost there...
I'm seeing this error from gulp's output (added trace: true to the sass call):
image

@AntJanus
Copy link
Contributor

AntJanus commented Dec 5, 2014

I changed a few things around. As long as bundler and ruby are installed correctly, the cli should work right (note that it hasn't been tagged and released yet). I changed a few things around, implemented a few fixes from win spawn and successfully installed several apps (just to make sure it works!).

@jsmreese I'm running a similar setup (jruby 1.7.15, Sass 3.4.7 and I'm on Windows 8, best windows there is). Sass was installed via bundler (the gulpfile specifies bundleExec on the command too). I wonder if that makes a difference?

@jsmreese
Copy link
Author

jsmreese commented Dec 5, 2014

Booya.

I uninstalled jruby 1.7.16.1 and installed jruby 1.7.15.

gem install bundler sass as instructed, but that installs sass 3.4.9, which doesn't work with gulp-ruby-sass.

gem uninstall sass
gem install sass -v "3.4.7"
npm start

And it builds.

Thanks for the help @AntJanus @gakimball @gerrytucker!

@gakimball
Copy link
Contributor

@viztastic Well, the framework came in a little hot last week, so we'd just like to get a slightly more stable version out for people using the framework this early. It's just a lot of little bug fixes.

The Bower package is also currently missing the _settings.scss file, so if you install the framework standalone that file isn't as easy to find.

@Nielstm
Copy link

Nielstm commented Dec 27, 2014

@gerrytucker @benjaminzanatta @dhye360 @gakimball

Ik had the same error on Windows:
Error: spawn ENOENT
at errnoException (child_process.js:1011:11)

The solution for me was to install git for Windows on http://git-scm.com/ en restart my pc.

@gakimball
Copy link
Contributor

Can any Windows users help us test a new build of the CLI? We're working on improving error-handling and cross platform support.

Here's how to run the test install:

git clone https://github.com/zurb/foundation-cli.git
cd foundation-cli
npm install
npm test

If all goes well, you'll see three green check marks at the end of the install. If you get an error, please paste it in here so we can take a look. Thanks!

@tnedich
Copy link

tnedich commented Feb 20, 2015

Win 7 Ultimate 64-bit
io.js platform

foundation-cli@1.0.4 test C:\Users\Admin\Desktop\zurb-test\foundation-cli
./bin/cli.js new test

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Test failed. See above for more details.

@gakimball
Copy link
Contributor

@tnedich Fixed that: 3d9b47

The command should at least start now.

@tnedich
Copy link

tnedich commented Feb 20, 2015

Now it starts and there is one red mark :)

Win 7 Ultimate 64-bit
io.js platform

✗ Ruby gems not installed. Try running bundle manually.

@gakimball
Copy link
Contributor

Hmm, well luckily we're going to remove Ruby from the install process entirely, so I won't stress about that. The Git, npm, and Bower parts working are the most critical.

@jgamao
Copy link

jgamao commented Feb 23, 2015

I am using Ubuntu 14.04 LTS in releasing my game but I also have this error.

I am also using nodejs.. Can you help me to solve this?

@gakimball
Copy link
Contributor

@jgamao Which error are you getting? And is it with the current CLI or this test version?

@fhassan2014
Copy link

Here is the error for above test install.

error

@gakimball
Copy link
Contributor

@fhassan2014 Ah, sorry about that, there was a line of debugging code I left uncommented that forces an error to happen. If you have time, could you try testing it again? I'd appreciate it :)

  • Delete the test folder the CLI created
  • Run git pull
  • npm test again

@fhassan2014
Copy link

Hi There,

I'm new on Foundation-apps, Creating new app and install dependencies all are fine but when I gulp(build) the project it gives me some errors and this css file " assets/css/app.css " is missing.

here are errors while building project.

image

@gakimball
Copy link
Contributor

@fhassan2014 The template project uses Bundler to install the right version of Sass for you. Run bundle install and then try compiling again.

The next version of the CLI won't require Ruby or Bundler, thankfully :)

@fhassan2014
Copy link

@gakimball here I tested again. looks fine your test build:

image

@gakimball
Copy link
Contributor

@fhassan2014 Ah that's fantastic :) Thanks again for trying it out.

@gakimball
Copy link
Contributor

@fhassan2014 You can just run gulp if you have it installed globally. The way the watch and build commands work changed slightly in the new CLI, although the functionality is the same.

foundation-apps watch is identical to npm start which is identical to gulp.

@fhassan2014
Copy link

Hi @gakimball getting these errors while watch command. Any suggestion would be appreciated. Need to test one project to see how Foundation for apps works. Thanks.

image

@gakimball
Copy link
Contributor

@fhassan2014 Try just running gulp inside your project folder instead, since that's what the watch command is running. (If you don't have Gulp: npm install -g gulp)

The watch command will make more sense once all three of the Foundation frameworks use the CLI, and then watch becomes a shorthand for "run whatever this project needs to run".

@soumak77
Copy link
Contributor

@gakimball Just as curiosity, what are those three frameworks? Foundation for Apps, Foundation for Sites, and ...?

@gakimball
Copy link
Contributor

@soumak77 Ink is the third one, which is being rebranded as Foundation for Emails when v2.0 comes out in a few months. Unifying the branding partially represents our push to share more code, styles, and best practices between the three frameworks.

@soumak77
Copy link
Contributor

@gakimball Oh ok, yeah I new about Ink and the rebranding to Foundation for Emails, but didn't realize there was a need for a CLI for that framework. I thought it was just templates you copied and manually injected whatever content you needed into the provided areas. I haven't used F4E yet (which may be clear by my last statement), though that is definitely something I want to get started with as my company emails need some much loving care.

@fhassan2014
Copy link

@gakimball now getting this final page. Not sure it suppose to be like this.
result

and got this error before building project:
image

Before all this I had this Warning Engin: foundation-cli@1.0.4: wanted: <"node":">=0.10.33"> <current: 0.10.32, npm: 1.4.28

I hope you'll find any solution on this. I also tried running gulp and gave me this screen:
image

@gakimball
Copy link
Contributor

@fhassan2014 The second error EADDRINUSE means you already have a server for another Apps project running, or at least you have something else running on port 8080. Close out your other build process, run gulp again, and then it should work.

@fhassan2014
Copy link

@gakimball Thanks! it's fine, the only thing lift is browser is looking these missing files. any thoughts.

result

@gakimball
Copy link
Contributor

@fhassan2014 It looks like the Sass isn't compiling to CSS; that's why there's a "Not Found" error in the console, for css/app.css. Are you still getting the same gulp-ruby-sass error in your other screenshots?

@fhassan2014
Copy link

@gakimball Yes. Any solution.

@gakimball
Copy link
Contributor

@fhassan2014 I just noticed you're running a pre-release build of JRuby, so I think that's the issue. The error is being generated by the Sass executable, meaning it's a Ruby error, not a JavaScript one. You might need to switch to a stable version of JRuby, or file an issue with their team.

@gakimball
Copy link
Contributor

This is a somewhat older issue, so I'm going to close it out. The original issue filed has been fixed, and version 1.1 of the CLI, which we published last month, greatly improves the stability and error-handling of the project creation process.

If y'alls have any more issues with the CLI in the future, do let us know :)

@narration-sd
Copy link

Thanks, Geoff.

On Apr 20, 2015, at 11:21, Geoff Kimball notifications@github.com wrote:

This is a somewhat older issue, so I'm going to close it out. The original issue filed has been fixed, and version 1.1 of the CLI, which we published last month, greatly improves the stability and error-handling of the project creation process.

If y'alls have any more issues with the CLI in the future, do let us know :)


Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests