Menu icon Foundation
Cannot install Foundation for Sites using foundation new

Hi,

I want to install Zurb Foundation in a Laravel project I installed in a Vagrant VM (Ubuntu).
I followed the official documentation, which has less details than for Foundation 5...
Anyway, I installed npm and triggered foundation new.

I get an error as you can see in the image attached.

Any idea why? Btw, why the error talks about Foundation for Apps where I am interested in Foundation for Sites?

Thanks in advance.

Install foundation fail

Hi,

I want to install Zurb Foundation in a Laravel project I installed in a Vagrant VM (Ubuntu).
I followed the official documentation, which has less details than for Foundation 5...
Anyway, I installed npm and triggered foundation new.

I get an error as you can see in the image attached.

Any idea why? Btw, why the error talks about Foundation for Apps where I am interested in Foundation for Sites?

Thanks in advance.

Install foundation fail

This post has been closed. No new replies can be added.

Vladimir over 3 years ago

@Nicolas Lemoine you should have told me that you are using Laravel and Zurb before :) I have a complete manual (my own :) ) on how to install Laravel with Foundation, and it works like a charm (just for Zurb boys and girls to resolve couple of issues and it will be OK). If you search you should find that manual here on forum. I wrote it just for cases like yours.

Brian Tan over 3 years ago

I did the following testing (folder test was first created without write permission, and install failed as expected).

[briantan@toronto local]$ sudo mkdir test
[briantan@toronto local]$ cd test
[briantan@toronto test]$ foundation new
? What are you building today? A website (Foundation for Sites)
? What's the project called? (no spaces) abc
? Which template would you like to use? Basic Template: includes a Sass compiler

            .
           /|     ,
      , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!
     /|/       |/ |       -------------------------------------------
 |___|            |___|   Let's set up a new project.
 \___|  ^^   ^^   |___/   It shouldn't take more than a minute.
     | -[O]--[O]- |
     |    ___,    |
     |    ...     |
      \__________/


Downloading the project template...There was an issue running git clone to download the Foundation for Apps template.
Make sure your computer's Git is configured properly and then try again.

The folder test is then changed to writable, and everything went smoothly.

[briantan@toronto test]$ sudo chmod 777 .
[briantan@toronto test]$ foundation new
? What are you building today? A website (Foundation for Sites)
? What's the project called? (no spaces) abc
? Which template would you like to use? Basic Template: includes a Sass compiler

            .
           /|     ,
      , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!
     /|/       |/ |       -------------------------------------------
 |___|            |___|   Let's set up a new project.
 \___|  ^^   ^^   |___/   It shouldn't take more than a minute.
     | -[O]--[O]- |
     |    ___,    |
     |    ...     |
      \__________/


Downloading the project template...
Done downloading!

Installing dependencies...

\
> spawn-sync@1.0.15 postinstall /usr/local/test/abc/node_modules/gulp-sass/node_modules/node-sass/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall
......
mkdirp@0.5.1, glob@5.0.15, npmconf@2.1.2, gaze@0.5.2, meow@3.7.0, cross-spawn@2.1.5, request@2.69.0, sass-graph@2.1.1, node-gyp@3.3.1)

You're all set!

 ✓ New project folder created.
 ✓ Node modules installed.
 ✓ Bower components installed.

Now run foundation watch while inside the abc folder.

[briantan@toronto test]$ 

Nicolas Lemoine over 3 years ago

Hi Vladimir,

I tried your solution but I have some issues:

	$ sudo npm install foundation-sites --save
	npm ERR! tar.unpack untar error /home/vagrant/.npm/inherits/2.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/is-utf8/0.2.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/spdx-exceptions/1.0.4/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/multipipe/0.1.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/ansi-regex/2.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/array-differ/1.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/array-find-index/1.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/array-uniq/1.0.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/beeper/1.1.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/builtin-modules/1.1.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/color-convert/1.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/clone/1.0.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/clone-stats/0.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/camelcase/2.1.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/escape-string-regexp/1.0.5/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/core-util-is/1.0.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/decamelize/1.2.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/ansi-styles/2.2.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/has-ansi/2.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/object-assign/3.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/graceful-fs/4.1.3/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/get-stdin/4.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/error-ex/1.3.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/is-arrayish/0.2.1/package.tgz
	npm WARN install:is-arrayish@0.2.1 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/is-arrayish-7d0f49db/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/is-builtin-module/1.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/hosted-git-info/2.1.4/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._basevalues/3.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._basetostring/3.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._basecopy/3.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/isarray/0.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._getnative/3.9.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._reescape/3.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._reevaluate/3.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._isiterateecall/3.0.9/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/jquery/2.2.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash.escape/3.2.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._root/3.0.1/package.tgz
	npm WARN install:lodash._root@3.0.1 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/lodash._root-081396ff/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash._reinterpolate/3.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash.restparam/3.6.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash.isarguments/3.0.8/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash.keys/3.1.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash.isarray/3.0.4/package.tgz
	npm WARN install:lodash.isarray@3.0.4 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/lodash.isarray-62c956fd/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/camelcase-keys/2.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/map-obj/1.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash.template/3.6.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash.templatesettings/3.1.1/package.tgz
	npm WARN install:lodash.templatesettings@3.1.1 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/lodash.templatesettings-ccd1c0a0/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/is-finite/1.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/parse-json/2.2.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/number-is-nan/1.0.0/package.tgz
	npm WARN install:number-is-nan@1.0.0 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/number-is-nan-5f599a60/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/minimist/1.2.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/pify/2.3.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/pinkie/2.0.4/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/pinkie-promise/2.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/object-assign/4.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/path-exists/2.1.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/find-up/1.1.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/semver/5.1.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/path-type/1.1.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/repeating/2.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/replace-ext/0.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/concat-with-sourcemaps/1.0.4/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/signal-exit/2.1.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/loud-rejection/1.3.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/source-map/0.5.3/package.tgz
	npm WARN install:source-map@0.5.3 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/source-map-fd15f9f0/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/process-nextick-args/1.0.6/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/indent-string/2.1.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/has-gulplog/0.1.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/glogg/1.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/sparkles/1.0.0/package.tgz
	npm WARN install:sparkles@1.0.0 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/sparkles-7166df40/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/spdx-correct/1.0.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/string_decoder/0.10.31/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/spdx-expression-parse/1.0.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/gulplog/1.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/duplexer2/0.0.2/package.tgz
	npm WARN install:duplexer2@0.0.2 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/duplexer2-6e556b47/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/readable-stream/1.1.13/package.tgz
	npm WARN install:readable-stream@1.1.13 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/readable-stream-7cf73404/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/spdx-license-ids/1.2.0/package.tgz
	npm WARN install:spdx-license-ids@1.2.0 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/spdx-license-ids-6a4f9e81/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/load-json-file/1.1.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/strip-bom/2.0.0/package.tgz
	npm WARN install:strip-bom@2.0.0 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/strip-bom-fd19bf1c/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/supports-color/2.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/strip-ansi/3.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/chalk/1.1.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/time-stamp/1.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/trim-newlines/1.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/redent/1.0.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/util-deprecate/1.0.2/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/fancy-log/1.2.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/validate-npm-package-license/3.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/readable-stream/2.0.5/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/normalize-package-data/2.3.5/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/read-pkg/1.1.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/read-pkg-up/1.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/vinyl/0.5.3/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/meow/3.7.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/through2/2.0.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/gulp-util/3.0.7/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/gulp-header/1.7.1/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/what-input/1.2.5/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/foundation-sites/6.2.0/package.tgz
	npm ERR! tar.unpack untar error /home/vagrant/.npm/xtend/4.0.1/package.tgz
	npm WARN install:xtend@4.0.1 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/xtend-8e3f7e1e/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/dateformat/1.0.12/package.tgz
	npm WARN install:dateformat@1.0.12 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/dateformat-4937d430/package.json'
	npm ERR! tar.unpack untar error /home/vagrant/.npm/strip-indent/1.0.1/package.tgz
	npm WARN install:strip-indent@1.0.1 EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/strip-indent-1f0bd177/package.json'
	npm ERR! Linux 3.19.0-25-generic
	npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "foundation-sites" "--save"
	npm ERR! node v5.8.0
	npm ERR! npm  v3.7.3
	npm ERR! path /var/www/teamleague/node_modules/.staging/inherits-75e66392/package.json
	npm ERR! code EPERM
	npm ERR! errno -1
	npm ERR! syscall chown

	npm ERR! Error: EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/inherits-75e66392/package.json'
	npm ERR!     at Error (native)
	npm ERR!  { [Error: EPERM: operation not permitted, chown '/var/www/teamleague/node_modules/.staging/inherits-75e66392/package.json']
	npm ERR!   errno: -1,
	npm ERR!   code: 'EPERM',
	npm ERR!   syscall: 'chown',
	npm ERR!   path: '/var/www/teamleague/node_modules/.staging/inherits-75e66392/package.json',
	npm ERR!   fstream_finish_call: 'chown',
	npm ERR!   fstream_type: 'File',
	npm ERR!   fstream_path: '/var/www/teamleague/node_modules/.staging/inherits-75e66392/package.json',
	npm ERR!   fstream_class: 'FileWriter',
	npm ERR!   fstream_stack: 
	npm ERR!    [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:306:21',
	npm ERR!      '/usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:210:7',
	npm ERR!      'FSReqWrap.oncomplete (fs.js:82:15)' ] }
	npm ERR! 
	npm ERR! Please try running this command again as root/Administrator.

	npm ERR! Please include the following file with any support request:
	npm ERR!     /var/www/teamleague/npm-debug.log

Any idea what happened? I am trying to think that working with a VM is not a good idea... Too complicated.

Vladimir over 3 years ago

Did you tried cleaning your npm cache with npm cache clean???

 

Vladimir over 3 years ago

And also what is inside your package.json file? You might take a look at this thread on Laracast forum Laracasts forum theread

Nicolas Lemoine over 3 years ago

Unfortunately, it does not solve the issue.

I recreated my VM from scratch to test it...

Nicolas Lemoine over 3 years ago

Hi, it's fine now. I managed to make it work. I was installing Foundation right from my vm, on ssh.

Installing from my Operating System in the shared folder worked smoothly. Thanks for the help and for the tutorial that helped me configure Foundation.

I will now test if it works while coding. Just did the configuration which works.

Sven CAILTEUX over 3 years ago

Not sure but it's written :) try a simple command :

git clone https://github.com/zurb/foundation-sites-6.git

doest it work ?

Vladimir over 3 years ago

Had similar problems with F6 installation via git on my Ubuntu so I switched to npm. No problems since then.

Brian Tan over 3 years ago

I had this git problem before, turned out to be folder write permission problem.

Nicolas Lemoine over 3 years ago

Hello,

Thank you all for your replies.

@Sven, The git clone works indeed, but I wanted to try the cli solution.
@Vlad, I should probably go to npm indeed.
@Brian, Foundation should create the folder so what permission problem could it be?

So right after creating the post, I installed Foundation with composer since I also installed Laravel with composer.

But, as a noob, I have no idea how I can work with it. As far as I understood, what is inside vendor in the Laravel project should not be touched. But inside, there is Foundation.

Any idea how to proceed?

Thanks

Brian Tan over 3 years ago

The problem is if you do not have write permission to create new project folder within the parent folder that you ran foundation new in.

Nicolas Lemoine over 3 years ago

I've changed the rights of the parent folder already with a regular chmod 777 but it does not change anything.