Skip to content

Got error after first install #154

@aferrop

Description

@aferrop

Hi, I want to try Herbie, but after installing it according to the documentation with Composer, I get this error:
Unknown "css_add" function in "main.twig" at line 2.

Platform: Windows 10 22H2, PHP 8.2.12, Composer 2.8.12
Install log:
Creating a "getherbie/start-website" project at "./first-web"
Installing getherbie/start-website (v2.1.1)

  • Installing getherbie/start-website (v2.1.1): Extracting archive
    Created project in C:\programas\first-web
    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 29 installs, 0 updates, 0 removals
  • Locking ausi/slug-generator (v1.1.1)
  • Locking erusev/parsedown (1.7.4)
  • Locking erusev/parsedown-extra (0.8.1)
  • Locking getherbie/herbie (v2.2.0)
  • Locking getherbie/plugin-simplecontact (v2.0.1)
  • Locking getherbie/plugin-simplesearch (v2.0.0)
  • Locking imagine/imagine (1.5.0)
  • Locking laminas/laminas-diactoros (3.6.0)
  • Locking psr/container (1.1.2)
  • Locking psr/event-dispatcher (1.0.0)
  • Locking psr/http-factory (1.1.0)
  • Locking psr/http-message (1.1)
  • Locking psr/http-server-handler (1.0.2)
  • Locking psr/http-server-middleware (1.0.2)
  • Locking psr/log (1.1.4)
  • Locking psr/simple-cache (1.0.1)
  • Locking symfony/console (v5.4.47)
  • Locking symfony/deprecation-contracts (v3.6.0)
  • Locking symfony/finder (v5.4.0)
  • Locking symfony/polyfill-ctype (v1.33.0)
  • Locking symfony/polyfill-intl-grapheme (v1.33.0)
  • Locking symfony/polyfill-intl-normalizer (v1.33.0)
  • Locking symfony/polyfill-mbstring (v1.33.0)
  • Locking symfony/polyfill-php73 (v1.33.0)
  • Locking symfony/polyfill-php80 (v1.33.0)
  • Locking symfony/service-contracts (v3.6.0)
  • Locking symfony/string (v6.4.26)
  • Locking symfony/yaml (v5.4.45)
  • Locking twig/twig (v3.21.1)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 29 installs, 0 updates, 0 removals
    0 [>---------------------------] 0 [->--------------------------]
  • Installing symfony/polyfill-mbstring (v1.33.0): Extracting archive
  • Installing erusev/parsedown (1.7.4): Extracting archive
  • Installing erusev/parsedown-extra (0.8.1): Extracting archive
  • Installing symfony/polyfill-ctype (v1.33.0): Extracting archive
  • Installing symfony/deprecation-contracts (v3.6.0): Extracting archive
  • Installing twig/twig (v3.21.1): Extracting archive
  • Installing symfony/yaml (v5.4.45): Extracting archive
  • Installing symfony/polyfill-php80 (v1.33.0): Extracting archive
  • Installing symfony/finder (v5.4.0): Extracting archive
  • Installing symfony/polyfill-intl-normalizer (v1.33.0): Extracting archive
  • Installing symfony/polyfill-intl-grapheme (v1.33.0): Extracting archive
  • Installing symfony/string (v6.4.26): Extracting archive
  • Installing psr/container (1.1.2): Extracting archive
  • Installing symfony/service-contracts (v3.6.0): Extracting archive
  • Installing symfony/polyfill-php73 (v1.33.0): Extracting archive
  • Installing symfony/console (v5.4.47): Extracting archive
  • Installing psr/simple-cache (1.0.1): Extracting archive
  • Installing psr/log (1.1.4): Extracting archive
  • Installing psr/http-message (1.1): Extracting archive
  • Installing psr/http-server-handler (1.0.2): Extracting archive
  • Installing psr/http-server-middleware (1.0.2): Extracting archive
  • Installing psr/event-dispatcher (1.0.0): Extracting archive
  • Installing imagine/imagine (1.5.0): Extracting archive
  • Installing ausi/slug-generator (v1.1.1): Extracting archive
  • Installing getherbie/herbie (v2.2.0): Extracting archive
  • Installing getherbie/plugin-simplecontact (v2.0.1): Extracting archive
  • Installing getherbie/plugin-simplesearch (v2.0.0): Extracting archive
  • Installing psr/http-factory (1.1.0): Extracting archive
  • Installing laminas/laminas-diactoros (3.6.0): Extracting archive
    0/19 [>---------------------------] 0%
    10/19 [==============>-------------] 52%
    19/19 [============================] 100%
    6 package suggestions were added by new dependencies, use composer suggest to see details.
    Generating autoload files
    15 packages you are using are looking for funding.
    Use the composer fund command to find out more!
    No security vulnerability advisories found.

According to a previous issue, the configuration seems correct.
main.php

<?php
return [
    'language' => 'en',
    'locale' => 'en_EN',
    'enabledPlugins' => 'simplecontact,simplesearch',
    'enabledSysPlugins' => 'twig,markdown,imagine',
    'components' => [
        'urlManager' => [
            'niceUrls' => false,
        ]
    ]
];

From logger.log

  • 2025-09-27 23:10:05.323002 [debug] [herbie] [pid:6568] Plugin CORE with type virtual installed successfully {} {}
  • 2025-09-27 23:10:05.324197 [debug] [herbie] [pid:6568] Plugin simplecontact with type composer installed successfully {} {}
  • 2025-09-27 23:10:05.324586 [debug] [herbie] [pid:6568] Plugin simplesearch with type composer installed successfully {} {}
  • 2025-09-27 23:10:05.326759 [debug] [herbie] [pid:6568] Plugin LOCAL_EXT with type virtual installed successfully {} {}
  • 2025-09-27 23:10:05.327363 [debug] [herbie] [pid:6568] Plugin APP_EXT with type virtual installed successfully {} {}
  • 2025-09-27 23:10:05.330477 [debug] [herbie] [pid:6568] Plugin SYS_INFO with type virtual installed successfully {} {}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions