A repo to repro (see what I did there?) an issue where tests and build fails in yarn modern because of a missing @babel/runtime dependency. See: GetStream/stream-chat-react#2218
To Reproduce
I've created a bug repro repo here: https://github.com/imccausl/stream-chat-react-yarn-modern-bug-repro-repo
Steps to reproduce the behaviour:
- Clone the project (https://github.com/imccausl/stream-chat-react-yarn-modern-bug-repro-repo)
- install the project
nvm use && yarn install
(uses yarn v4 with the pnp linker) yarn build
to "build" the project with babel and webpack. You'll get an error:Can't resolve '@babel/runtime/helpers/defineProperty
yarn test
to run tests (transpiled with babel). You'll get an error:Cannot find module '@babel/runtime/helpers/extends'
- Clone (if necessary) and link the local
stream-chat-react
repo withyarn link /path/to/stream-chat-react
(replacing /path/to with the correct path to your local stream-chat-react repo). - In the local stream-chat-react repo,
yarn add @babel/runtime
(@babel/runtime should be a direct dependency not a dev dependency) - Running
yarn test
oryarn build
in thestream-chat-react-yarn-modern-bug-repro-repo
will now work.