I've been searching the Web and can't find this situation mentioned anywhere, although it must be not uncommon.
I've been using create-react-app
(version 3.4.x) with react-app-rewired
[primarily in order to enable decorator support (for MobX) without ejecting].
I recently tried to upgrade cra
to the latest version (4.0), following the instructions, by running this command:
yarn add --exact react-scripts@4.0.0
However, now when starting my React server, I get this error:
yarn start
yarn run v1.22.5
$ HTTPS=true BROWSER=none react-app-rewired start --env=local
Cannot read property 'use' of undefined
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
If I remove react-app-rewired
and change the start script back to using react-scripts
, the server starts but I don't have decorator support anymore.
Questions: Does react-app-rewired
support cra
4.0? Is there an alternative solution for enabling decorators without ejecting? Thanks for any input!