Menu icon Foundation
Managing multiple Sites/CLI versions

Hello,

I've been updating Foundation Sites for new projects as I create them.  As such, I have a number of projects of different ages, all the way back to v4.x.

I'm currently trying to recompile sass on a v6.2.1 project using the latest Foundation CLI (v2.2.3 (I believe)), and it's failing.

I have run 'foundation update' in the project folder, which changed it to v6.2.4.  This surprised me - why not 6.4.x - but perhaps it's smart enough to only update to the latest maintenance release.

With 6.2.1 and 6.2.4 I receive "Error: The `libsass` binding was not found in..." errors when I run 'foundation build' from the project folder. The sub of the error states "This usually happens because your node version has changed", so I changed the version of npm I'm running (using nvm), with the same error.

I honestly don't recall if I used Foundation CLI to install the project in question. I may have done it manually.  For example, when I was developing it, I'd use 'npm run build', which is different than the current Foundation CLI build command - 'foundation build'.

I'm kinda stuck and have no idea how I'm supposed to keep up with current versions of Foundation Sites and Foundation CLI while allowing older sites to use older versions. For example, updating my v6.2.x site to 6.4.x could/will have drastic implications on the codebase.

My questions...

How is the community managing older codebases? Are you updating every project codebase every time you update Foundation Sites and/or Foundation CLI?
Is Foundation CLI compatibile with older versions of Foundation Sites?
Can Foundation CLI be unistalled and older versions of it installed to work with older versions of Sites?

Thanks very much,
Doug

sitescliversionerror

Hello,

I've been updating Foundation Sites for new projects as I create them.  As such, I have a number of projects of different ages, all the way back to v4.x.

I'm currently trying to recompile sass on a v6.2.1 project using the latest Foundation CLI (v2.2.3 (I believe)), and it's failing.

I have run 'foundation update' in the project folder, which changed it to v6.2.4.  This surprised me - why not 6.4.x - but perhaps it's smart enough to only update to the latest maintenance release.

With 6.2.1 and 6.2.4 I receive "Error: The `libsass` binding was not found in..." errors when I run 'foundation build' from the project folder. The sub of the error states "This usually happens because your node version has changed", so I changed the version of npm I'm running (using nvm), with the same error.

I honestly don't recall if I used Foundation CLI to install the project in question. I may have done it manually.  For example, when I was developing it, I'd use 'npm run build', which is different than the current Foundation CLI build command - 'foundation build'.

I'm kinda stuck and have no idea how I'm supposed to keep up with current versions of Foundation Sites and Foundation CLI while allowing older sites to use older versions. For example, updating my v6.2.x site to 6.4.x could/will have drastic implications on the codebase.

My questions...

How is the community managing older codebases? Are you updating every project codebase every time you update Foundation Sites and/or Foundation CLI?
Is Foundation CLI compatibile with older versions of Foundation Sites?
Can Foundation CLI be unistalled and older versions of it installed to work with older versions of Sites?

Thanks very much,
Doug

Doug Biggerstaff 9 months ago

Wow - tough room.

Let's simplify the question...

When a new version of Foundation for Sites comes out, do you spend the time updating every project that's using an older version?

Thanks very much for your time.

Doug

Otti Ott 10 days ago

Hi Doug,

 

Just came across your post here and was wondering how are managing older and newer projects in Foundation.

I have some older projects using an old CLI and early versions of Foundation 6. The projects load fine at the moment, but I'm also afraid of getting errors when I upgrade to a newer CLI.

Many thanks for your help.

otti

Doug Biggerstaff 10 days ago

Hi Otti,
 
Basically, I don’t update older Foundation projects to the latest version.  It’s a big task and my clients do not want to pay for it.
 
So, to accommodate multiple (older) Foundation versions, I have added Node Version Manager (nvm) to my workflow - https://github.com/creationix/nvm
 
For example, if I’m working on a v5.5 installation, I load the appropriate npm version with nvm and operate normally, referring the archived Foundation docs for markup/scss/js differences as required.  If I then go to a project using 6.4.3, all it takes is a different ‘nvm use’ command.
 
Fortunately, the cli commands are more-or-less standard across versions so it’s quite manageable.
 
Unfortunately, my understanding of the cli itself is limited - I don’t fully appreciate whether an update will break older builds - but so far, as long as I have the correct npm version active, all of my older builds execute properly.  Yes, that is a bit concerning, but I guess that’s a problem I’ll deal with if/when it comes up.
 
Best of luck to you!
 
Doug

Otti Ott 10 days ago

Hi Doug,

Thank you very much for your reply - much appreciated.

The Node Version Manager sounds Like the way to go. I will try it later today, but firstly need to sort out what will happen when I'm updating the CLI. According to the installation instructions on the Foundation website I need to update the CLI.

How do you handle the automated updates through git? So far, I have disconnected from git versioning after I had downloaded the repository and checked everything. Do you leave the connection to the repository and if so, do you get "undesired" updates?

Cheers

Otti