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

Cannot Clone the repository and install with npm #510

Closed
coolwebs opened this issue Oct 12, 2015 · 35 comments
Closed

Cannot Clone the repository and install with npm #510

coolwebs opened this issue Oct 12, 2015 · 35 comments

Comments

@coolwebs
Copy link

Having issues getting GRUNT to comile the FoundationPress files. I have latest versions of node and npm installed and I was able to clone this GIT repo on my computer but as soon as I try running the "npm install" command on the downloaded directory - I come across heaps of errors that tell me that there is nothing wrong with the npm command but rather an issue with a problem with the foundationpress package. Is there something that I am missing here? Is the package still OK?

Is there any other method of compiling SASS files into CSS?

Thanks

screen shot 2015-10-12 at 4 53 03 pm

@olefredrik
Copy link
Owner

I have seen that there are some who have had problems with npm install lately. The errors seems to be casued by permission issues on the postinstall scripts. Do you have administrator privileges on your account? I have no problems with npm install on my OSX 10.11 running the latest version of Node.js. I'm currently quite busy with another project, but I'll check into this when I get time. There must be a solution to this, so that anyone can install without problems.

@coolwebs
Copy link
Author

Thanks for your quick reply Fredrik.
I have admin privileges as its my own personal MacBook Pro. Perhaps I forgot to run it with sudo or something. Have latest versions of node and npm.

BTW I am running OSX Yosemite if that helps.

Regards,

Ryan Archer

On 12 Oct 2015, at 5:10 PM, Ole Fredrik Lie [email protected] wrote:

I have seen that there are some who have had problems with npm install lately. The errors seems to be casued by permission issues on the postinstall scripts. Do you have administrator privileges on your account? I have no problems with npm install on my OSX 10.11 running the latest version of Node.js. I'm currently quite busy with another project, but I'll check into this when I get time. There must be a solution to this, so that anyone can install without problems.


Reply to this email directly or view it on GitHub.

@olefredrik
Copy link
Owner

Hmm. It shouldn't really be necessary to run npm install with sudo. I'm not. And it just works. But you're not the only one experiencing this, so we must find out what is causing the error. The whole purpose of this project is to offer a quick way to get started on new projects. So if you're going to waste a lot of time on installation, that's not good. Let me see what I can find out. If someone else knows how this can be resolved, please share the solution in this thread.

@olefredrik olefredrik added the bug label Oct 12, 2015
@olefredrik
Copy link
Owner

@stefanjudis : Is there a possibility that you may have some insight into why npm install fails on post install scripts? I'm running the most recent OSX with the latest version of Node, and experience no problems. But there are certain others who reports an error during installation. #501

I thought maybe you could help, since you helped us to remove global dependencies and introduce postinstall scritps initially. #274

@stefanjudis
Copy link
Contributor

@coolwebs

Can you please provide your node and npm version?
Also the folder structure inside of your node_module might help.

There shouldn't be any case to run it with sudo. :bowtie:

@bpinet
Copy link

bpinet commented Oct 12, 2015

I've got same issue on Debian.

@stefanjudis
Copy link
Contributor

@bpinet

Then same here - can you please provide node and npm versions and maybe the logfile? :bowtie:

@bpinet
Copy link

bpinet commented Oct 12, 2015

Node v0.12.7
NPM 2.11.3

I get this info:
npm ERR! Failed at the [email protected] install script 'node scripts/install.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js

Here's log.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'rebuild', 'node-sass' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 info readInstalled object
6 verbose rebuild path, id [ '/var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/node-sass',
6 verbose rebuild   '[email protected]' ]
7 silly rebuild set [ '/var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/node-sass' ]
8 info build /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/node-sass
9 info preinstall [email protected]
10 info linkStuff [email protected]
11 silly linkStuff [email protected] has /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules as its parent node_modules
12 verbose linkBins [email protected]
13 verbose link bins [ { 'node-sass': 'bin/node-sass' },
13 verbose link bins   '/var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin',
13 verbose link bins   false ]
14 verbose linkMans [email protected]
15 verbose rebuildBundles [email protected]
16 verbose rebuildBundles [ 'async-foreach',
16 verbose rebuildBundles   'chalk',
16 verbose rebuildBundles   'cross-spawn',
16 verbose rebuildBundles   'gaze',
16 verbose rebuildBundles   'get-stdin',
16 verbose rebuildBundles   'glob',
16 verbose rebuildBundles   'meow',
16 verbose rebuildBundles   'mkdirp',
16 verbose rebuildBundles   'nan',
16 verbose rebuildBundles   'node-gyp',
16 verbose rebuildBundles   'npmconf',
16 verbose rebuildBundles   'request',
16 verbose rebuildBundles   'sass-graph' ]
17 silly gentlyRm /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/node-sass is being purged
18 verbose gentlyRm don't care about contents; nuking /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/node-sass
19 info install [email protected]
20 verbose unsafe-perm in lifecycle false
21 info [email protected] Failed to exec install script
22 verbose stack Error: [email protected] install: `node scripts/install.js`
22 verbose stack Exit status 1
22 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
22 verbose stack     at EventEmitter.emit (events.js:110:17)
22 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
22 verbose stack     at ChildProcess.emit (events.js:110:17)
22 verbose stack     at maybeClose (child_process.js:1015:16)
22 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
23 verbose pkgid [email protected]
24 verbose cwd /var/www/ekspresysaeco/wp-content/themes/FoundationPress
25 error Linux 3.2.0-4-amd64
26 error argv "/usr/bin/node" "/usr/bin/npm" "rebuild" "node-sass"
27 error node v0.12.7
28 error npm  v2.11.3
29 error code ELIFECYCLE
30 error [email protected] install: `node scripts/install.js`
30 error Exit status 1
31 error Failed at the [email protected] install script 'node scripts/install.js'.
31 error This is most likely a problem with the node-sass package,
31 error not with npm itself.
31 error Tell the author that this fails on your system:
31 error     node scripts/install.js
31 error You can get their info via:
31 error     npm owner ls node-sass
31 error There is likely additional logging output above.
32 verbose exit [ 1, true ]

@stefanjudis
Copy link
Contributor

@bpinet

But that's a different error. I assume npm install node-sass is failing in any folder?
Can you please confirm?

@coolwebs

ja what should I say. Working fine here.

https://gist.github.com/stefanjudis/c22f0128e62cb5f1946a

Can you please confirm that you're got grunt and bower on first level inside of your node_modules folder?

And also that the execution srcipts are included in node_modules/.bin?

@coolwebs
Copy link
Author

node: v4.1.2
npm: v2.14.4

Within the node_modules folder within the 'FoundationPress' installed folder I can see the 'grunt' and 'bower' folders.

All I can seen in the node_modules/.bin folder is a grunt shortcut.
I cannot see where the log file is. My terminal tells me to look for a file called 'npm-debug.log' but I can't find this file anywhere.

I have attached a screenshot of my dir.
mode-nodules-dir

@bpinet
Copy link

bpinet commented Oct 13, 2015

@stefanjudis

npm install node-sass works fine in other folder.

Here's full log for npm install in FoundationPress folder.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 verbose readDependencies loading dependencies from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/package.json
6 verbose install where, deps [ '/var/www/ekspresysaeco/wp-content/themes/FoundationPress',
6 verbose install   [ 'bower',
6 verbose install     'grunt',
6 verbose install     'grunt-cli',
6 verbose install     'grunt-contrib-compress',
6 verbose install     'grunt-contrib-concat',
6 verbose install     'grunt-contrib-copy',
6 verbose install     'grunt-contrib-uglify',
6 verbose install     'grunt-contrib-watch',
6 verbose install     'grunt-sass',
6 verbose install     'grunt-string-replace',
6 verbose install     'node-sass',
6 verbose install     'time-grunt' ] ]
7 verbose install where, peers [ '/var/www/ekspresysaeco/wp-content/themes/FoundationPress',
7 verbose install   [] ]
8 verbose installManyTop reading for lifecycle /var/www/ekspresysaeco/wp-content/themes/FoundationPress/package.json
9 info preinstall [email protected]
10 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/bower/package.json
11 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt/package.json
12 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-cli/package.json
13 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-compress/package.json
14 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-concat/package.json
15 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-copy/package.json
16 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-uglify/package.json
17 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-watch/package.json
18 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-sass/package.json
19 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-string-replace/package.json
20 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/node-sass/package.json
21 verbose installManyTop reading scoped package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/time-grunt/package.json
22 info package.json [email protected] No license field.
23 info package.json [email protected] No license field.
24 info package.json [email protected] No license field.
25 info package.json [email protected] No license field.
26 info package.json [email protected] No license field.
27 info package.json [email protected] No license field.
28 info package.json [email protected] No license field.
29 info package.json [email protected] No license field.
30 info package.json [email protected] No license field.
31 verbose readDependencies loading dependencies from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/package.json
32 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/bower/package.json
33 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt/package.json
34 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-cli/package.json
35 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-compress/package.json
36 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-concat/package.json
37 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-copy/package.json
38 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-uglify/package.json
39 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-contrib-watch/package.json
40 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-sass/package.json
41 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/grunt-string-replace/package.json
42 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/node-sass/package.json
43 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/time-grunt/package.json
44 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/bower/package.json
45 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/bower.cmd/package.json
46 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/grunt/package.json
47 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/grunt-string-replace/package.json
48 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/grunt-string-replace.cmd/package.json
49 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/grunt.cmd/package.json
50 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/node-sass/package.json
51 verbose targetResolver reading package data from /var/www/ekspresysaeco/wp-content/themes/FoundationPress/node_modules/.bin/node-sass.cmd/package.json
52 verbose already installed skipping grunt-string-replace@~0.2.7 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
53 verbose already installed skipping node-sass@~3.3.0 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
54 verbose already installed skipping time-grunt@~1.1.0 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
55 verbose already installed skipping bower@~1.4.1 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
56 verbose already installed skipping grunt-cli@^0.1.13 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
57 verbose already installed skipping grunt@~0.4.5 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
58 verbose already installed skipping grunt-contrib-compress@~0.13.0 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
59 verbose already installed skipping grunt-contrib-concat@~0.3.0 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
60 verbose already installed skipping grunt-contrib-copy@~0.4.1 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
61 verbose already installed skipping grunt-contrib-uglify@~0.2.7 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
62 verbose already installed skipping grunt-contrib-watch@~0.5.3 /var/www/ekspresysaeco/wp-content/themes/FoundationPress
63 verbose already installed skipping grunt-sass@~1.1.0-beta /var/www/ekspresysaeco/wp-content/themes/FoundationPress
64 silly install resolved []
65 info build /var/www/ekspresysaeco/wp-content/themes/FoundationPress
66 info linkStuff [email protected]
67 silly linkStuff [email protected] has /var/www/ekspresysaeco/wp-content/themes as its parent node_modules
68 verbose linkBins [email protected]
69 verbose linkMans [email protected]
70 verbose rebuildBundles [email protected]
71 verbose rebuildBundles [ '.bin',
71 verbose rebuildBundles   'bower',
71 verbose rebuildBundles   'grunt',
71 verbose rebuildBundles   'grunt-cli',
71 verbose rebuildBundles   'grunt-contrib-compress',
71 verbose rebuildBundles   'grunt-contrib-concat',
71 verbose rebuildBundles   'grunt-contrib-copy',
71 verbose rebuildBundles   'grunt-contrib-uglify',
71 verbose rebuildBundles   'grunt-contrib-watch',
71 verbose rebuildBundles   'grunt-sass',
71 verbose rebuildBundles   'grunt-string-replace',
71 verbose rebuildBundles   'node-sass',
71 verbose rebuildBundles   'time-grunt' ]
72 info install [email protected]
73 info postinstall [email protected]
74 verbose unsafe-perm in lifecycle true
75 info [email protected] Failed to exec postinstall script
76 verbose stack Error: [email protected] postinstall: `bower install && grunt build`
76 verbose stack Exit status 3
76 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
76 verbose stack     at EventEmitter.emit (events.js:110:17)
76 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
76 verbose stack     at ChildProcess.emit (events.js:110:17)
76 verbose stack     at maybeClose (child_process.js:1015:16)
76 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
77 verbose pkgid [email protected]
78 verbose cwd /var/www/ekspresysaeco/wp-content/themes/FoundationPress
79 error Linux 3.2.0-4-amd64
80 error argv "/usr/bin/node" "/usr/bin/npm" "install"
81 error node v0.12.7
82 error npm  v2.11.3
83 error code ELIFECYCLE
84 error [email protected] postinstall: `bower install && grunt build`
84 error Exit status 3
85 error Failed at the [email protected] postinstall script 'bower install && grunt build'.
85 error This is most likely a problem with the foundationpress package,
85 error not with npm itself.
85 error Tell the author that this fails on your system:
85 error     bower install && grunt build
85 error You can get their info via:
85 error     npm owner ls foundationpress
85 error There is likely additional logging output above.
86 verbose exit [ 1, true ]

@stefanjudis
Copy link
Contributor

@bpinet @coolwebs Can you please try the same with the latest npm 2.x version 2.4.17?
It's the latest release bfore 3.x which should only include fixes.

Honestly I've got no idea what's going on.

Everybody running npm install should have a grunt and bower folder on first level + the depending executable in .bin. This is what they promise. :)

So the problem is not actually the postinstall - but rather that the installation is not working properly.

@bpinet
Copy link

bpinet commented Oct 13, 2015

I've used this commend to update npm curl -L https://npmjs.com/install.sh | sh

Now I have 3.3.6.

I got this warning, but it looks like it worked just fine.

npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) [email protected] bower install && grunt build /var/www/ekspresysaeco/wp-content/themes/FoundationPress
[email protected] node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/noptify/node_modules/nopt/node_modules/abbrev -> node_modules/abbrev
[email protected] node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/noptify/node_modules/nopt -> node_modules/nopt

@stefanjudis
Copy link
Contributor

I've used this commend to update npm curl -L https://npmjs.com/install.sh | sh

no need for that ( it works though ;) )... when you once have npm installed you can easily jump between versions with:

npm install -g npm // latest one
npm install -g [email protected] // specific version

Can you maybe check the 2.4.17 version? So that we can figure out, if they fixed it in one of the fix-releases in 2.x?

@coolwebs
Copy link
Author

@stefanjudis - are you sure that npm version is right. My most up to date version was v2.14.4.
I tried using that line to install v2.4.17 and then I tried v2.17.4. I dunno, now that its failed my complete npm package is screwed. How can I uninstall it and reinstall it again? I am trying the instructions here https://docs.npmjs.com/misc/removing-npm but it tells me that access is denied and I can't install a clean npm version as it says "command not found"

@stefanjudis
Copy link
Contributor

Fu... Sorry to hear that. :(

https://github.com/npm/npm/releases points out that v2.14.7 is the latest stable 2.x release.

I assume you can install it over it with this thingy?

curl -L https://npmjs.com/install.sh | sh

As I'm responsible for your fuck up - let me know if I can help via skype, hangout or anything. :(

Note:
Ahh I see... what you ran into... I had a typo in there... Shit - I'm so sorry. :(

i'm jumping between npm version all the time and never had problems with that...

@coolwebs
Copy link
Author

Thanks for following up with me @stefanjudis - lets just say this isn't the first time I've had issues with node. Mucking around with ionic and phonegap CLI forced me to do clean uninstall/reinstall several times.

I don't want to get node via the installer again so I completely cleaned out the junk and did it with Homebrew (not before having to repair Homebrew as well!) So yeah now I have node v0.10.28 and npm v3.3.8, so it seems I've done a jump like @bpinet (maybe he used brew as well).

So I got much further this time but still ran into errors and still could not successfully run npm build to get the SASS files to write css - good news is that I found a log file this time which I have attached.

Scratch that, cannot attach a log file or a txt file in GITHUB, so here is a link to it http://coolwebs.com.au/npm-debug.txt

@coolwebs
Copy link
Author

Ok, so I got tired of doing it on a mac so I have it a go on my work PC which is still running the version of node and npm that i stated earlier. One thing I noticed is that the instructions on the .MD file state to run npm install but @bpinet said he runs the command npm install node-sass - which did have a much better result and did not throw an error!

However, I can't run the npm run build, it fails. I can however fun npm run watch but as soon as I change a file and it tries to compile, it throws the same error as the build command.

I have attached a screenshot from CMD
cmd-foundationpress-errors

@coolwebs
Copy link
Author

Man I'm through with trying to compile sass, @olefredrik - do you have a version of FoundationPress that just uses CSS and not SASS? I can reverse engineer it into SASS later and use Compass to do all the compiling/watching. The CLI way keeps telling me that it has issues with Bower and Grunt and keeps blaming your package.

I just want to get the theme into a WP installation so I can have a play with it. I'm hoping for a time in the future that browsers will just read SASS files instead of CSS but that's probably quite some time away...

@olefredrik
Copy link
Owner

I had hoped that we could find out what was the core of the problem here. I'm not getting any of the errors that you get, so that makes it all a bit more difficult to troubleshoot.

This is essentially a starter-theme which is heavily based on a workflow using Sass and Grunt. So if you just want to hack on the CSS, I would recommend that you take a look at JointsWP, which offers a package for both Sass and CSS. Out of curiosity, you can test if you're able to run Sass on JointsWP?

@coolwebs
Copy link
Author

Yes Fredrik, I did come across JointsWP today and i sent Stefan an email asking how much different it was from FoundationPress. I'm not sure what's going on. Makes me feel like doing a complete reset of my macbook and anything i have ever installed through terminal.

@bpinet
Copy link

bpinet commented Oct 14, 2015

I give up. I've switched to 2.5.0 and it didn't work. After going back to 3.3.6 it does not work anymore. Same error every time.

@Didel
Copy link

Didel commented Oct 30, 2015

I just found out about FoundationPress and wanted to start using it today. I didn't came any further, as I am still struggling to get it up and running. I have tried upgrading/reinstalling node, using sudo and anything I thought would make some sense, but to no avail.

It looks like I'm having the same issue @coolwebs stated earlier. It seems that line 4 of foundation.scss is causing the error, as it is trying to compile the scss using a non-existing reference to ../components/foundation/scss/normalize. I can not find this directory (or any /components/foundation/ directory) in the cloned folder.

I hope this is of any help. OS used is Mac OS X 10.11.1 (El Capitan), node and npm versions are found in log below.

MacBook:FoundationPress didel$ npm run build
> [email protected] build /Applications/MAMP/htdocs/wp-content/themes/FoundationPress
> grunt build
Running "copy:scripts" (copy) task
Running "copy:iconfonts" (copy) task
Running "string-replace:fontawesome" (string-replace) task
Running "sass:dist" (sass) task
>> file to import not found or unreadable: ../components/foundation/scss/normalize
>> Current dir: /Applications/MAMP/htdocs/wp-content/themes/FoundationPress/assets/scss/
>>   Line 4  Column 9  assets/scss/foundation.scss
Warning:  Use --force to continue.
Aborted due to warnings.

Execution Time (2015-10-30 00:37:40 UTC)
loading tasks               273ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 94%
copy:scripts                  5ms  ▇ 2%
string-replace:fontawesome    3ms  ▇ 1%
sass:dist                     6ms  ▇ 2%
Total 290ms

npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `grunt build`
npm ERR! Exit status 6
npm ERR! 
npm ERR! Failed at the [email protected] build script 'grunt build'.
npm ERR! This is most likely a problem with the foundationpress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt build
npm ERR! You can get their info via:
npm ERR!     npm owner ls foundationpress
npm ERR! There is likely additional logging output above.
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! path npm-debug.log.8d0f1362c3d07127fc992c5ac59e43eb
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open

npm ERR! Error: EACCES: permission denied, open 'npm-debug.log.8d0f1362c3d07127fc992c5ac59e43eb'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, open 'npm-debug.log.8d0f1362c3d07127fc992c5ac59e43eb']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'open',
npm ERR!   path: 'npm-debug.log.8d0f1362c3d07127fc992c5ac59e43eb' }
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!     /Applications/MAMP/htdocs/wp-content/themes/FoundationPress/npm-debug.log

And the debug-log from the last line above:

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 [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild [email protected]
6 info build [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec build script
9 verbose stack Error: [email protected] build: `grunt build`
9 verbose stack Exit status 6
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 [email protected]
11 verbose cwd /Applications/MAMP/htdocs/wp-content/themes/FoundationPress
12 error Darwin 15.0.0
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
14 error node v4.2.1
15 error npm  v2.14.7
16 error code ELIFECYCLE
17 error [email protected] build: `grunt build`
17 error Exit status 6
18 error Failed at the [email protected] build script 'grunt build'.
18 error This is most likely a problem with the foundationpress package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     grunt build
18 error You can get their info via:
18 error     npm owner ls foundationpress
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

@stefanjudis
Copy link
Contributor

@Didel

so you're running

node v4.2.1
npm  v2.14.7

?

And the initial npm i process succeeded. We already figured out, that the problem is connected to bower.

I assume that you don't have node_module/.bin/bower available in your project root?

@olefredrik I have still no idea what's going on. :( I'm so sorry about that.
Maybe we want to switch back to global installation advices?

I just tried the same setup - node v4.2.1 and npm v2.14.7. And it's running all smoothly. :(

https://gist.github.com/stefanjudis/b957405858aab427aeac

@olefredrik
Copy link
Owner

I can not understand what's causing these errors, since it runs smoothly on my machine. OSX El Capitan, Node v.4.1.1, NPM v.2.14.4.

Basically, I believe that it is still a good idea to drop global dependencies. But if people experience showstopper errors on installation, it' maybe a relevant question whether we should roll back to global installation of bower. What do you think, @stefanjudis ?

@stefanjudis
Copy link
Contributor

@olefredrik

Honestly i'm fine with rolling back - I don't like it though.

But the fact that I was not able to reproduce the problem at all ( and I tried really several node&npm combinations ), makes it impossible to debug or solve. :(

Also there should be an npm issue filed about it.

@Didel
Copy link

Didel commented Nov 2, 2015

@stefanjudis Correct, node -v returns v4.2.1 and npm -v returns 2.14.7.

However, file node_modules/.bin/bower exists and is not empty. The same goes for node-modules/.bin/grunt, node-modules/.bin/grunt-string-replace and node-modules/.bin/node-sass.

I'm running the latest version of OS X El Capitan (10.11.1). I just have tried again, and indeed exact the same errors occur when I try to run npm run build. If I can do/test/run anything else I'd be glad to hear.

@olefredrik
Copy link
Owner

I have two macbooks, both running OSX El Capitan. I've installed Node v4.2.1 and npm 2.14.7 on both machines. With a fresh clone of FoundationPress, I experience no issues at all with npm install or npm run build. Since I am unable to reproduce the error with the same setup as you, it becomes very difficult to troubleshoot.

@olefredrik
Copy link
Owner

@Didel : Is it right that you don't have a components/foundation/ directory in your cloned folder, after npm install? When the repo is cloned, you will not have these files. They should, however, be generated on npm install.

@Didel
Copy link

Didel commented Nov 2, 2015

@olefredrik @stefanjudis Weird. This morning I decided to remove the entire FoundationPress folder and start all over again. After a git clone, npm install and npm build everything works as expected and I can use the FoundationPress theme.

The previous time I cloned the project I got all different kinds of errors, so I did all kinds of things in a desperate try to fix the problem. For example, I updated and upgraded all the npm packages and npm and node itself. I happend to have quite an old version of node (0.12) and apparently lots of things have changed since then, so I installed my current node version. So effectively I first cloned the project and try to install and build it, then updated and upgraded everything, while apparently doing the other way around is the right way to go. Maybe this won't happen to users who have a relatively fresh install of node and/or npm, and only affects users who could have outdated copies of any of the above? Could it help to include update/upgrade instructions in the installation manual? And could it help to require a minimal node-version? I remember to have read somewhere that as of node 3.4 (or 3.2, I don't remember exactly) something has changed which fixes a lot of things... Just dropping my thoughts on the problem, I'm glad I can start working on the theme today 😄

@olefredrik
Copy link
Owner

@Didel : Woho! I'm happy it worked out, finally! It's a good idea to include the required minimal node version in the readme. I removed it from the quickstart because I was not 100% sure which version is required. But I'll run a manual test with nvm and check that.

@olefredrik
Copy link
Owner

@coolwebs : Are you still experiencing npm install issues with a fresh clone using node v.4.2.1 and npm v.2.14.7?

@Aetles
Copy link
Contributor

Aetles commented Nov 2, 2015

A wild guess is that a lot of the weird, hard-to-reproduce problems are cause by old versions of FoundationPress used with the new way of doing things.

FoundationPress really isn't upgradeable at all (unless you carefully do it manually) and neither is the workflow, since so much have changed. That could be a problem if you have various FoundationPress-based sites based on different checkouts of the code over the last year(s). It does not help that node, npm, lib-sass etc have had their own compatibility issues as well, on top of everything else.

@coolwebs
Copy link
Author

coolwebs commented Nov 2, 2015

@olefredrik, In all honesty I have not been playing with it lately. I had a website to build and decided to get up and running with JointsWP and just use CSS overrides agains the core Foundation CSS. From what I can see, Foundation based themes are quite robust and really made me appreciate how commercial themes (like from ThemeForest) can just needlessly way down a Wordpress website with tonnes of features that you never use and a ‘glut’ of code to process on every page load.

I will revisit FoundationPress at a later time I hope. Can you tell me in what key ways that it differs from JointsWP?

On 2 Nov 2015, at 9:16 PM, Ole Fredrik Lie [email protected] wrote:

@coolwebs https://github.com/coolwebs : Are you still experiencing npm install issues with a fresh clone using node v.4.2.1 and npm v.2.14.7?


Reply to this email directly or view it on GitHub #510 (comment).

Ryan Archer | Web Designer & Developer
Coolwebs Web Design
Email: [email protected]
Phone: 0468 417 387
Website: http://www.coolwebs.com.au http://www.coolwebs.com.au/

@olefredrik
Copy link
Owner

@coolwebs : 👍 To be honest, I haven't used JointsWP myself. But I guess it's pretty much the same, with a few variations in workflow and build settings (grunt vs gulp etc). They are both built on Foundation 5, so the available components will be the same for both.

@Aetles : It is true that is's not necessarily straight forward to upgrade a FoundationPress installation. The idea is to start with the latest version when starting a new project, and take it from there. Have tried to make it easier to see what's new by introducing a changelog and release archive. Earlier versions will always be downloadable under releases. So you're free to choose whether you will jump on the latest version, or use an earlier version. Or use a JointsWP or another theme, for that matter.

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

No branches or pull requests

6 participants