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

来源:互联网 时间:1970-01-01

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) http://127.0.0.1:8080/assets/styles/main.css

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:

npminstallcompass

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

https://www.npmjs.com/package/compass

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.

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


相关阅读:
Top