August 3, 2022 How to Fix Liferay 7.3 and 7.4 Theme Build and Deploy Issue  

Themes are created using the Liferay Theme Generator. Liferay DXP 7.3 uses version 10. x.x of Theme Generator. 

Note:  

To create themes for DXP 7.0 or 7.1, install version 8.x.x of the Theme Generator. Themes for older versions of Liferay DXP can be generated using previous versions of the Liferay Theme Generator. 

When you create a Liferay theme with 10.x.x of theme generator and try to build and deploy the theme you might face issues, follow the steps mentioned below guided by the screenshots to fix the issue. 
Click here for Liferay 7.3 theme generator

To fix theme build and deploy issues, you need to follow the steps below

1) Open the package.json file and make the changes as shown below. 

File path: themes/x-theme/package.json 

For the DevDependencies section, we will need to change the below-mentioned three property versions. 

"devDependencies":  

"liferay-frontend-theme-styled": "5.0.0", 

"liferay-frontend-theme-unstyled": "5.0.0", 

"liferay-theme-tasks": "^10.0.2", 

2) Remove node-modules, dist and build folder. 

3) Run the below command. 

npm install -g yo gulp 

4) Install node 12.22.2 

5) Install npm with the command- 

npm install 

6) Now run the command. 

npm build 

npm deploy 

That’s all, a simple guide to fixing the theme generator issue in Liferay DXP. Are you facing any other issues with Liferay development or implementation? Check out our repository or reach out to us at marketing@contcentric.com. We can consult on the business solutions with Liferay implementations. 

Hiren Davda

Hiren is a Front-end lead with ContCentric who enjoys sharing what he learns as a Front-end developer with others. His spare time includes reading good books and attending business/networking meet-ups. He is passionate about financial investing and entrepreneurship.

    Have a Business Inquiry ?

    Let us collaborate and break yet another barrier to digitalization. Connect with us to discuss the project!






    Let us connect the digital dots!

    We are seeking dynamic professionals and unstoppable talents to craft distinct solutions for our clients to enhance their businesses. Come, join our fair & focused, optimistic & thoughtful world and deliver excellence together.

    Discipline

    Innovation

    Growth