This week, I have been looking at Sage Roots 8.5.1 to install on my server. I would like to get into some more modern workflow and hopefully save some time in the long run while developing websites.
Sage has a big update coming and they plan on using Yarm, Boostrap 4 and more.
Therefore, the install is a litle bit different for the latest version of Sage. Don’t mix them up. I decided to go for the latest stable build but was pulling in the build from Github, obviously this won’t work as the stable build still uses Gulp and Bower. I have used these in the past and still remember it quite well so it wasn’t too hard to setup. Basically, I followed the Theme installation instructions here.
Connect to your Server and run the following command in your themes folder
Serverpilot Composer is a little bit different, so instead of “Composer” you have to use: “composer7.1-sp” as shown below.
# @ example.com/site/web/app/themes/ $ composer7.1-sp create-project roots/sage your-theme-name 8.5.1
Install NodeJS, NPM, Bower and SASS on Ubuntu
Next I installed all of the above using the following commands:
$ sudo apt-get update $ sudo apt-get install nodejs
In this case, we also need to install npm, which is the Node.js package manager. You can do this by typing:
$ sudo apt-get install npm
Lastly, we still need Bower and SASS. We can use:
$ sudo bower install $ sudo npm install node-sass
I got an error when I was trying to install SASS, if you do get an error then check if everything has been installed okay with:
$ nodejs --version $ npm --version
If you see that everything is installed and well then you might have to create manually a symlink /usr/bin/node. Shortcut for bash compatible shells:
$ sudo ln -s `which nodejs` /usr/bin/node
Or if you use non-standard shells, just hardcode the path you find with which nodejs:
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
Now you can run the commands to kickstart your Sage project, navigate to your theme directory and run these two commands:
$ npm install $ bower install
For more info on which commands you can run just check out the Sage Tutorial for version 8.5.1.
After this, everything was working for me! Now I’m off to install the setup with Bedrock, so more coming soon!