Running a new jHipster Application using Compass and the main CSS file is not loading

How to fix a Newly Created jHipster Application not Loading the Main CSS File 

If you see an error similar to the following upon first startup of a jHipster application you have just created:

Failed to load resource: the server responded with a status of 404 (Not Found)

Issue loading main.css on jHipster application
jHipster with CSS not loaded

Then you will need to run the grunt task, grunt compass.

Install Compass

You will need to first install Compass, an open-source CSS Authoring Framework before you can run the Grunt task to create the main.css file which is missing.

Using node:

npm install compass

Reference the following link for more info about installing compass using npm

Run Grunt Task

After you install Compass, you will then need to run the grunt task.  In in IntelliJ you can click the grunt task runner at the bottom of your screen or go to Tools -> Open Grunt Console.

Use grunt task runner console to create Main CSS file
Run grunt compass task to create main.css file

Restart your Application

Try refreshing and restarting your application and the styling should now display correctly.

mvn spring-boot:run

Popular posts from this blog

How to set up a SQL Server 2008 Local Database

Spring Boot Internationalization with Default Locale for Message Strings

Change Port on a Spring Boot Application when using intelliJ