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

Your controllers.json file was not found. Be sure to add a Webpack alias from "@symfony/stimulus-bridge/controllers.json" to *your* controllers.json file. #77

Open
dokselblackbit opened this issue Dec 13, 2022 · 3 comments

Comments

@dokselblackbit
Copy link

Hello. I have some error:
Your controllers.json file was not found. Be sure to add a Webpack alias from "@symfony/stimulus-bridge/controllers.json" to *your* controllers.json file.
I added into webpack.config.js Encore.enableStimulusBridge('./assets/controllers.json')
How to fix it?

controllers.json is into assets
{ "controllers": [], "entrypoints": [] }

@weaverryan
Copy link
Member

Hi!

Hmm, I'm not sure! Encore.enableStimulusBridge('./assets/controllers.json') should be all you need. That creates a Webpack alias from @symfony/stimulus-bridge/controllers.json to ./assets/controllers.json, which this bridge then uses. I can't imagine what would be causing this to short-circuit. Is there anything special of custom about your set up or Webpack setup?

@amavis442
Copy link

I do not know if this is still an issue, but #30 (comment) solved it for me. I overwrote the alias and using Encore.addAliases({}) fixed it for me.

@Oussama-lasri
Copy link

add this - .enableStimulusBridge('./assets/controllers.json') - in webpack.config.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants