Upgrading Node - Older Project

I have a quick question about updating node/bower/gulp as I’ve never had to do that before. I have an old project laying around that I finally have the go ahead to wrap up. It’s quite a bit old, which, got me to thinking that I hadn’t updated my setup in a while and decided to update node/bower/gulp.

I’m using Sage 8.4 for my projects (I have a slightly customized version of it I use) I was running a rather old version of node and I ended up using n to upgrade to 4.8.4 (after realizing the latest LTS didn’t play so nice). I also upgraded Bower/Gulp using npm install -g bower/npm install -g gulp.

Everything seems to have gone fairly smoothly, the only issue is I got an error when trying to run gulp watch saying I needed to run, “npm rebuild node-sass” - which - I did and now everything seems to run fine, however, it got me to thinking is there anything else I need to worry about here or any problems I might run into?

Here’s the specific output:

Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 4.x

Found bindings for the following environments:
  - Linux 64-bit with Node 0.10.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.

Also did I really need to upgrade node, is there any sort of security issue for using a dated version - or - not so much for this purpose? (I only use node on this box for roots/sage).

Thanks so much for helping me understand, I know it’s a potential noob question.

Node sass need to be compiled depending on your node version which is the reason of that error you got. All the other libraries you’d use on the frontend usually don’t require to be recompiled as they’ll run at runtime in the browser. You might end up in a situation where one of your libraries is not supported in newer versions of node and you have to user an older one, but most of the times, most things should work without too many issues! Keep an eye open on your console :slight_smile:

You’re quite right - everything seemed to have been fine, I was able to finish out that old lingering project despite updating. No errors after rebuilding node-sass.

Thank so much for your response, I appreciate it! Consider it resolved! :slight_smile:

1 Like