Skip to content

[ERROR] Module build failed: Module not found: @symfony/stimulus-bundle #53463

Answered by BAD-WOLF
BAD-WOLF asked this question in Q&A
Discussion options

You must be logged in to vote

I understand, besides the error you told me

"Err you ask for a home controller while only having a hello controller."

also find out something else I was doing wrong

{% block body %}
    {{ stimulus_controller('hello') }}
{% endblock %}

In this case, the result obtained is in fact the string 'data-controller'hello'. Since the controller was not linked to an HTML element, but rather written in the "body" of the document, the correct way to use it would be:

{% block body %}
    <div {{ stimulus_controller('hello') }}>...</div>
{% endblock %}

Thank you for your attention and help

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@MatTheCat
Comment options

@BAD-WOLF
Comment options

@MatTheCat
Comment options

@BAD-WOLF
Comment options

Answer selected by BAD-WOLF
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants