Trying to get @symfony/ux-react to work as per this documentation:
https://symfony.com/bundles/ux-react/current/index.html
Did the following steps
composer require symfony/ux-react
yarn add -D @babel/preset-react --force
yarn encore dev --watch
Also added the react.yaml file to config/packages
All seems to work fine but fails here:
import { registerReactControllerComponents } from '@symfony/ux-react';
registerReactControllerComponents(require.context('./react/controllers', true, /\.(j|t)sx?$/));
The error message is
"./assets/js/app.ts" contains a reference to the file "./react/controllers". This file can not be found, please check it for typos or update it if the file got moved.
Tried to use relative path but no success either.
What am I missing?
--forcebeing used for? And please run the composer diagnose function and put the command as well as the result into your question by editing it.