Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: definition.controllerConstructor is undefined #56

Open
Bartheyrman22 opened this issue Jan 21, 2025 · 0 comments
Open

TypeError: definition.controllerConstructor is undefined #56

Bartheyrman22 opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Bartheyrman22
Copy link
Contributor

vite-plugin-symfony version

7.1.0

vite-bundle version

7.1.0

your OS, node version, Symfony version, PHP version

vite 6.0.11, @hotwired/stimulus@^3.2.2, Ubuntu 22.04, node 20.15, symfony 6.4, PHP 8.3.8,

Description

I get "TypeError: definition.controllerConstructor is undefined" in the console when vite tries to reload the page after some JS changes.
And the JS changes will not come through as the page is not reloading.

Stack:
load vite-plugin-symfony_stimulus_helpers.js:2027
load vite-plugin-symfony_stimulus_helpers.js:2026
register vite-plugin-symfony_stimulus_helpers.js:2019

How to reproduce

Install the same versions and try to let vite reload the page by doing some javascript changes.

Possible Solution

A solution for me was to downgrade both pentatrion/vite-bundle and vite-plugin-symfony to version 6.5.3.
Only downgrading to 7.0.x was not enough. Downgrade to vite 5 also did not do the trick.
The issue started after a migration.

@Bartheyrman22 Bartheyrman22 added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant