npm errors with node-sass, node-sass deprecated, drop-in replacement available

The node-sass npm package has given me problems on various projects at various companies over the years. It's a js wrapper around a python implementation of Sass, a CSS pre-processor. Or maybe the python is there to run a ruby script, or something like that. I'm not really sure, I just want the package I npm install'd to work.

Errors usually look something like this: Error: node-sass@4.13.0 postinstall: node scripts/build.js

The first thing that usually happens is that it works on my machine but not my build machine, or vice-versa. That's usually resolved by making sure versions of node and npm are up to date on all invested parties.

Then I usually get the error locally complaining about Python not being available/not in the right place.

But today, I found out that node-sass is deprecated. The replacement is just sass, which is a Dart implementation of sass.

npm uninstall node-sass

npm install sass

Done. A quick smoke test and ready to deploy.