fourkitchens / emulsify

DEPRECATED (see README for new version)
GNU General Public License v2.0
163 stars 70 forks source link

Bem funtion is not found #146

Closed johnreytanquinco closed 7 years ago

johnreytanquinco commented 7 years ago

Currently, we are applying this as base theme to create our custom theme. Following the docs instruction, we encountered an issue about bem function not being found.

Drupal web console log: Twig_Error_Syntax: Unknown "bem" function. in Twig_ExpressionParser->getFunctionNodeClass() (line 21 of /opt/app-root/src/themes/custom/olympus/emulsify/components/_patterns/01-atoms/02-text/00-headings/_heading.twig).

Checking the theme's folder, we can actually noticed the file in vendor/drupal-pattern-lab/bem-twig-extension/bem.function.php.

Am I missing something?

evanmwillhite commented 7 years ago

This is likely because you're subtheming. Emulsify isn't meant to be a base theme, but a starterkit - something that should be changed and used as-is to meet the need. You will run into a number of issues with inheritance and Sass/JS compilation if you try and subtheme it.

ccjjmartin commented 7 years ago

@johnreytanquinco This could also be due to not running composer install or npm install as the bem function is not part of the Emulisfy repo but is pulled in from a separate repository during setup.