Build fails because Node version change / recompile manually via SSH works fine

Hi,

I use CircleCI to test the build process of my blog which is running metalsmith, a static site generator.

Some hours ago, I decided to add some modules, commited and pushed the changes to GitHub and realized that CircleCI was using an older Node version than I was using locally, thus failed to build the project (build #72). A quick peek into the docs revealed that this is easy fixable by setting the Node version accordingly in the the circle.yml file (which I wasn’t using at all before that).

Then I pushed the update and noticed that now the build fails because Grunt and Bower was not globally available, easy fixed by installing those via pre commands (build #74 *).

Now the actual problem: I pushed the updated environment and now the build fails once again because apparently the libsass binding was not found (build #84 *). The error message also mentioned that this “usually happens because your node version has changed” and that I should try to recompile manually using $ npm rebuild node-sass. Because you guys provide the option to SSH into the test box and debug manually, I did exactly that and ran the command: no problems. Even running grunt (the actual test command) worked just fine.

Because that feels like a caching issue, I decided to “Rebuild without cache” but for some reasons it fails at a completely different package when trying this: build #85

Unfortunately I can’t SSH into “cacheless builds” to try recompiling said module manually.

Can anyone shed some light into this?

Thanks in advance!

Edit: Nevermind, Build #85 is actually the fixed one, not sure why it works now. But apparently hitting “Rebuild without cache” several times works wonders. :smile: — Issue fixed!

* Since new Discuss users can’t add more than two links, I had to remove some of them - you need to manually navigate to the web pages.

Sometimes the cache gets corrupted and causes weird issues like this. :confused:

You can rebuild without cache, and if that does not help we can flush the cache for you (the ability to do it yourself is coming soon, currently in beta!)

This sounds like a great solution for this problem. I was even looking for something like this in the settings, but didn’t find anything :stuck_out_tongue:

Thanks for the quick reply.

If you wanna play with it now, just let me know what your GitHub org name is and I will add you to the beta. :slight_smile:

I just use my personal account (frdmn) at the moment - no organizations in use yet. Does that work too?

Yep! Sorry for the confusion a user account is also an “org” in GitHub + CircleCI lingo. Just enabled it, you should see this setting in project settings for any project now!

For instance:

https://circleci.com/gh/frdmn/blog.frd.mn/edit#clear-caches

Let me know how it goes.

Seems to work like a charm. Thanks for the invite! :thumbsup: