zurb / foundation-apps

The first front-end framework created for developing fully responsive web apps.
http://foundation.zurb.com/apps
MIT License
1.58k stars 216 forks source link

Missing libraries in packages.json file #654

Closed Dillie-O closed 9 years ago

Dillie-O commented 9 years ago

It could be a side effect of my upgrade from 1.0, but in order to get foundation-apps build to work for me, I had to overwrite my packages.json file with the one in the repo (nothing big there). After doing this and hitting a couple of errors, I had to add the following dependencies to my packages.json file for the gulp process to fully run:

"front-router": "~1.0.0" "yargs": "~3.13.0"

Again, this could be a remnant of my upgrade process, but I wanted to mention it just in case.

gakimball commented 9 years ago

Ah yeah, the 1.0.2 upgrade guide was written before we introduced those two libraries to the template.

Also, since you've upgraded, you can remove front-matter and through2 from your dependencies. Those are wrapped up in the front-router package.

Dillie-O commented 9 years ago

Oooh, good to know. I'll update that now.

Since I have you here, I'm seeing this error now when I try foundationapps-build

[09:37:02] 'uglify:foundation' errored after 1.1 ms [09:37:02] TypeError: Object # has no method 'if' at Gulp.gulp.task.gulp.src.pipe.$.webserver.port (C:\Users\Sean\Projects\prayerjournal\prayerjournal\gulpfile.js:152 :19) at module.exports (C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp\node_modules\orchestrator\li b\runTask.js:34:7) at Gulp.Orchestrator._runTask (C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp\node_modules\orc hestrator\index.js:273:3) at Gulp.Orchestrator._runStep (C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp\node_modules\orc hestrator\index.js:214:10) at C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp\node_modules\orchestrator\index.js:279:18 at finish (C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp\node_modules\orchestrator\lib\runTas k.js:21:8) at cb (C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp\node_modules\orchestrator\lib\runTask.js :29:3) at Gulp.gulp.task.gulp.src.pipe.$.sass.includePaths (C:\Users\Sean\Projects\prayerjournal\prayerjournal\gulpfile.js: 130:2) at module.exports (C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp\node_modules\orchestrator\li b\runTask.js:34:7) at Gulp.Orchestrator._runTask (C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp\node_modules\orc hestrator\index.js:273:3)

Am I missing a library for that? I saw a gulp-if library out there, but the syntax seems different.

gakimball commented 9 years ago

It is gulp-if, see if that's missing.

Dillie-O commented 9 years ago

Good to know about removing those libraries. I did so and added gulp-if

It appears that through2 might still be needed even though front-router is in place? Here's my npm install warning:

npm WARN unmet dependency C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp-ruby-sass\node_modules\vi nyl-fs\node_modules\glob-stream requires through2@'^0.6.1' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined

and my foundation-apps build has this error now

npm WARN unmet dependency C:\Users\Sean\Projects\prayerjournal\prayerjournal\node_modules\gulp-ruby-sass\node_modules\vi nyl-fs\node_modules\glob-stream requires through2@'^0.6.1' but will load npm WARN unmet dependency undefined, npm WARN unmet dependency which is version undefined

Maybe I need to npm uninstall to flush everything and do a fresh npm install? Previously I did npm uninstall front-matter and npm uninstall through2 to remove those libraries.

I greatly appreciate your time!

gakimball commented 9 years ago

Yeah, maybe try cleaning out your folder and starting again. The error here is related to through2 being used by vinyl-fs, which is being used by gulp. Dependencies get complicated. But it doesn't appear to be related to the instance of through2 that was being used at the top level.

To start over, try:

rm -rf node_modules
npm cache clean
npm install

Also, when you run npm uninstall, you need to add --save or --save-dev to make the change stick in your package.json file.

Dillie-O commented 9 years ago

Hazzah! That seemed to do the trick! I have a successful build and all.

I have some custom front-matter issues now to resolve, but that's on me to fix 8^D

Thanks again!

gakimball commented 9 years ago

Nice! If you have any suggestions for Front Router, let us know.