

#PREPROS COMPILE ERROR INSTALL#
Oh wait - are you getting an error? One that says you do not have sufficient user permissions? That’s ok and to be expected! Type sudo npm install sass -g and, after entering your computer’s user password, you should see the package downloading. This tells the npm package manager to find and download the Sass module, and the “-g” (or “-global”) flag indicates to install it globally - that is, accessible from anywhere on your machine. In your terminal, type npm install sass -g. Once you’ve got Node installed, you can use npm to download the Sass package. Node comes bundled with a package manager called npm, which we’ll be using to download Sass (and, in the last step, to run Sass as well!) For those who already have Node installed, type node -v in your terminal to see which version you have. (For those who are curious, Node is essentially a C++ program that is wrapped in JavaScript - thus you can write JS and under the hood, C++ is executed.) You can download Node right from their website and install from the zipped file as you would any other program.
#PREPROS COMPILE ERROR CODE#
Node is a JavaScript framework that allows you to write JavaScript code in your terminal, to gain access to features that JavaScript doesn’t normally do - in this case, reading and writing files on your local drive. Using the Command Line / Terminal can be an intimidating step for a beginner, but with some copy & pasted instructions, you can get up and running with Sass in the command line!
#PREPROS COMPILE ERROR SOFTWARE#
While the idea that the makers of useful software should be compensated for their work makes absolute sense to me, this is not ideal, and thankfully there are other ways to compile Sass without annoying popups.Ĭommand Line Sass Step One - Installing Node

(I call this “hassleware”, also known as “guiltware”). The downside is that Prepros exists as a paid program, and while available for free, the program will intermittently give the user pop-ups prompting one to purchase the program. Prepros provides a very user-friendly Graphical User Interface (GUI) to compile your Sass automatically, along with some extra features like minification and automatic auto-prefixing.

But I grew weary of this for reasons discussed below (any user of Prepros will know where I’m coming from). A number of tools exist to make this easy - in my personal experience, I was taught to use Prepros to easily compile my Sass. However, as browsers do not support Sass syntax, this comes with some more complicated concepts, like compiling your Sass to browser-readable CSS. Also, this article assumes the user knows basic commands for navigating folders and directories in the command line - if not, look into “pwd”, “cd”, and “ls”. In this article, I will be using “Sass” to include both Sass and SCSS - the two terms refer to syntax patterns and for our purposes are essentially interchangeable.Īn aside - I’m a Mac user, but these instructions should work for both Mac and PC. Sass, and other CSS preprocessors, can allow you to speed up writing code, and can give you a taste for the type of logic used in JavaScript to build functionality by writing functions, conditionals, and loops to output the CSS that you want. For those interested in learning to build websites, or those starting their journey to become front-end developers, learning Sass or SCSS can be an exciting step.
