Building a Liferay theme fails with an error "Cannot find module 'liferay-font-awesome'"

Solution 1:

I did not use blade but got the same error with first creating a theme skeleton with yo liferay-theme and then running gulp build.

The error seems to relate to liferay-font-awesome version 3.5.0 which is the version Liferay theme generator puts into package.json.

I then changed the liferay-font-awesome version to 3.4.2 in package.json, executed npm install to update node_modules and after this gulp build completed successfully.

I did not test the theme in practise, just got it compiled.