-
Notifications
You must be signed in to change notification settings - Fork 862
Major struggles with npm / grunt / node-sass when working with old and new FP projects simultaneously #553
Comments
Can't give you any help right now, but I familiar with the situation. I'm currently trying to convert an old FP project to use the new workflow with npm scripts and local dependencies, and I'm running into one error after another. (The fact that I have upgraded to OS X El Capitan does not help either because the new System Integrity Protection causes some changes as well.) I am probably making it harder for me since I won't fall back to using any global dependencies, because I really think the new way is the better way forward. But man, it's frustrating sometimes. There is so many tools in this chain and each can cause their own problems. |
dberz, I'm having the same problem. Just started today. Only differences on my end are:
And my FoundationPress version for this project is 1.0.0 and running OS X 10.10.5. I had to move my project to a new repo for some annoying reasons, and realized grunt disappeared in the process. Ran into this error when I tried copy/pasting the grunt and package.json files over to the new repo and running Is the only fix for this to grab a fresh, up-to-date version of FP and start styling that one? |
@swthate It took some sleuthing but I was able to configure a new working FoundationPress build. Note, I still cannot work on critical projects based on old FoundationPress versions. Steps that I took to get a new FoundationPress project up and running:
Quite a bit of effort but it works! However, I still cannot work on my old FoundationPress projects and would love solutions on how to make those work too! My latest error:
|
@dberz : If your dev environment is set up to work with FoundationPress 1.7.0, it should be really easy to build older projects using older versions of FoundationPress. Here is what I did.
Works great on OSX 10.11.1, node v4.2.1, npm v2.14.7. After @swthate : I don't think node v.0.12.0 is supported anymore, so I would recommend an update. Let me know how it goes. |
@olefredrik : Many thanks for the help. This does not work for me though. Here's the error:
To clarify above:
Another note: My old theme sits in the same directory as the theme I created using the latest FoundationPress build. Perhaps this is causing a conflict? |
@dberz : That explains a lot. So the download of node-sass is throwing a 404 error. Sorry for being unclear. I was suggesting copying the gruntfile.js and package.json from the v.1.7.0 (most recent version of FP) source code into your old theme folder. As long as you have copied the most recent (1.7.0) grunt and package files, you should be able to That would probably also solve the 404 error on node-sass, as the version specified in the most recent package.json is I would recommend using separate folders for different versions of the theme to avoid any conflicts. |
@olefredrik : getting closer I think. Thank you again. In your first note you reference pulling files from FoundationPress v.1.1.0. You clarified this to be from FoundationPress v.1.7.0 and this allowed me to successfully run npm install, though I did receive the following warning.
Then when running npm install, I noticed that .scss changes were not being picked up by grunt "watch". It seems that I need to reconfigure Gruntfile.js to point to the old directory structure, but I'm not sure exactly what to change. If I change:
to:
Grunt will at least notice changes to the sass files, but it doesn't fully output the css stylesheet as needed. I am wondering if at this point it make sense to rebuild my project off the new FoundationPress build, but that's going to be a lot of extra work for all my historic projects. |
I'm moving ahead with a new FoundationPress build. It's no longer urgent to troubleshoot this issue, but this might be a good use case to consider for the FoundationPress 6 project! |
I grabbed nvm, thinking it might be best to "manage" multiple installs of node. I verified that it's working, and am currently using node v5.1.0 and npm v3.3.12. I cloned the latest FoundationPress (1.7.0, right?) to a separate directory and copied it's grunfile.js and package.json files, then pasted those into my current project's theme directory (the one that is using FP 1.0). Unfortunately, it still errors out at This time, however, I noticed some errors during the install/build process like Here's a gist with the full error: https://gist.github.com/swthate/9c7b163cc75ffef241a2 I only have Xcode CLI installed, as I thought that's all I needed to get my environment to work when I first set it up. I'm downloading the Xcode app right now, hoping that will fix something? Thanks |
@dberz : That's weird. To be honest, I have no clue what is causing your error, as the error message you got didn't reveal what the actual problem is. @swthate : Use the mature and dependable version of node (v.4.2.2) and you should be good to go. Node v.5.1.0 with all the latest features is not supported. |
Thanks, @olefredrik Something interesting happened. After I installed and switched to node 4.2.2, I hopped in my theme directory and ran
I was surprised that the last npm install had actually gone through, albeit with some difficulties. I followed the error message and ran Thanks! |
👍 |
@olefredrik @Aetles - sorry to bother you guys again with my struggles, but I'm having a blocker production issue that might be related to the problems above. I've gone ahead and rebuild my project using the latest FoundationPress build. You can see this project (and the console error mentioned below) here: https://parsleyhealth.com In the console, I'm seeing the following error:
I believe all my site's Javascript is broken. For example, I cannot submit the webform here: Any insight to the error? I think it might be related to the installation of the themes base javascript files. I've run Thank you! |
@dberz : The issue seems to be related to the jQuery blockUI plugin. This is a thrid-party plugin that is not a part of the FoundationPress bundle. Have you tried disabling this plugin? |
@olefredrik : One possible clue - the FP theme's javascript files were not automatically 'build' into this version of FoundationPress. I had to pull them in manually as I thought this might be related to the terminal errors of this original thread. Is there a better place to pull / place the scripts needed for FoundationPress? Thank you! |
I wasn't suggesting disabling the blockUI plugin permanently. Just for debugging, to see if that's will clear your console errors. I wouldn't recommend pushing any updates to a to a live production site unless it builds perfectly on a dev / staging environment. Are you still unable to run |
I know that I should not have deployed. I was struggling across the board and was hoping this error was not a blocker. I learned that lesson the hard way :( Yes |
Try disabling the autoptimize plugin and see if that helps? |
Disabled. But that did not seem to correct the issue. |
If helpful, this does seem to be a theme-specific issue. When I use the wordpress theme preview feature to view my older theme - the error does not occur. Are there any references within the new FoundationPress to the .top object that I might be able to investigate? Perhaps functions around the top-bar? I'm also seeing a 1px gap just about my 'sticky' top bar nav on my production site. In my old theme, the top bar use to be flush with the top of the browser. |
OK, I figured out the error. It was related to my footer, which was not structured the same way as the new build. I recreated it within the latest FoundationPress build and all seems well. Many thanks again for the help! |
👍 |
Hello -
I've build a handful of production sites of this amazing framework but I'm having major issues working in these different projects at the same time. I'm new to node / npm / node-sass / etc and am receiving a wide variety of command line errors when trying to work on projects new and old.
For example:
—-
NEW PROJECT ERRORS:
I receive the following errors when following the QuickStart guide on github:
——
OLD PROJECT ERRORS:
One major project is based on a version of FoundationPress from about 6 months ago. My issues began when I received errors as follows:
——
In attempt to fix this, I attempted to re-install npm, which also resulted in errors.
——
I then reinstalled node.js (which included nom) and attempted to install node-sass:
This ran with warnings, and when attempting to run grunt again, I received a failure:
——
my current node version is v4.2.2
my current npm version is v2.14.7
I'm on a mac, OS v 10.9.5
——
I would greatly appreciate any advice towards my specific situation, as well as best practices regarding working on old and new FoundationPress projects. Given the frequent and substantive changes to the FoundationPress codebase I fear that I won’t always be able to keep all projects 100% up to date - so I need a way to work on both new and old projects simultaneously.
Thank you!
The text was updated successfully, but these errors were encountered: