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

fix: adds missing dependency @babel/runtime #507

Merged
merged 2 commits into from Jun 10, 2019

Conversation

marco-silva0000
Copy link
Contributor

Using yarn with pnp enabled enforces a correct dependency structure. While using any module that has this package as a dependency I get the following error:

ERROR in /home/msilva/.cache/yarn/v4/npm-react-transition-group-4.1.0-7b50c0a93a6c127336187252c3c1a70eff3304ce/node_modules/react-transition-group/esm/CSSTransition.js
Module not found: Error: Package "react-transition-group@4.1.0" (via "/home/msilva/.cache/yarn/v4/npm-react-transition-group-4.1.0-7b50c0a93a6c127336187252c3c1a70eff3304ce/node_modules/react-transition-group/esm/CSSTransition.js") is trying to require the package "@babel/runtime" (via "@babel/runtime/helpers/esm/extends") without it being listed in its dependencies (react, react-dom, dom-helpers, loose-envify, prop-types, react-transition-group)
 @ /home/msilva/.cache/yarn/v4/npm-react-transition-group-4.1.0-7b50c0a93a6c127336187252c3c1a70eff3304ce/node_modules/react-transition-group/esm/CSSTransition.js 1:0-58 228:43-51
 @ /home/msilva/.cache/yarn/v4/npm-react-transition-group-4.1.0-7b50c0a93a6c127336187252c3c1a70eff3304ce/node_modules/react-transition-group/esm/index.js
 @ /home/msilva/.cache/yarn/v4/npm-@material-ui-core-4.0.2-c7a07c1d1b13b94adf479d7267b51cb682fcb279/node_modules/@material-ui/core/Slide/Slide.js

to fix this I added the latest version of @babel/runtime to the dependencies.

Using yarn with pnp enabled enforces a correct dependency structure. While using any module that has this package as a dependency I get the following error:

```
ERROR in /home/msilva/.cache/yarn/v4/npm-react-transition-group-4.1.0-7b50c0a93a6c127336187252c3c1a70eff3304ce/node_modules/react-transition-group/esm/CSSTransition.js
Module not found: Error: Package "react-transition-group@4.1.0" (via "/home/msilva/.cache/yarn/v4/npm-react-transition-group-4.1.0-7b50c0a93a6c127336187252c3c1a70eff3304ce/node_modules/react-transition-group/esm/CSSTransition.js") is trying to require the package "@babel/runtime" (via "@babel/runtime/helpers/esm/extends") without it being listed in its dependencies (react, react-dom, dom-helpers, loose-envify, prop-types, react-transition-group)
 @ /home/msilva/.cache/yarn/v4/npm-react-transition-group-4.1.0-7b50c0a93a6c127336187252c3c1a70eff3304ce/node_modules/react-transition-group/esm/CSSTransition.js 1:0-58 228:43-51
 @ /home/msilva/.cache/yarn/v4/npm-react-transition-group-4.1.0-7b50c0a93a6c127336187252c3c1a70eff3304ce/node_modules/react-transition-group/esm/index.js
 @ /home/msilva/.cache/yarn/v4/npm-@material-ui-core-4.0.2-c7a07c1d1b13b94adf479d7267b51cb682fcb279/node_modules/@material-ui/core/Slide/Slide.js
```

to fix this I added the latest version of @babel/runtime to the dependencies.
@taion
Copy link
Member

taion commented Jun 4, 2019

I believe this is a bug with our build process right now. The ESM build uses Babel runtime, while the CJS build does not. Can we sync them up?

@TrySound
Copy link
Contributor

Not necessary. Missing dependency is a bug. Need just to add it.

@taion
Copy link
Member

taion commented Jun 10, 2019

The issue is that I don't think we're intentionally applying the runtime transform here. We don't do so for the CJS build, so why should we do so for the ESM build?

@TrySound
Copy link
Contributor

To not duplicate babel helpers for each module in this package. ESM thing is used for browsers. Node thing is less important. But we may do that too.

@taion
Copy link
Member

taion commented Jun 10, 2019

Ah, I see that the config for the ESM build doesn't exclude runtime. I guess that must be intentional.

@jquense jquense changed the title adds missing dependency @babel/runtime fix: adds missing dependency @babel/runtime Jun 10, 2019
@jquense jquense merged commit 228bf5f into reactjs:master Jun 10, 2019
jquense pushed a commit that referenced this pull request Jun 10, 2019
## [4.1.1](v4.1.0...v4.1.1) (2019-06-10)

### Bug Fixes

* adds missing dependency [@babel](https://github.com/babel)/runtime ([#507](#507)) ([228bf5f](228bf5f))
@jquense
Copy link
Collaborator

jquense commented Jun 10, 2019

🎉 This PR is included in version 4.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

johnfrench3 pushed a commit to johnfrench3/transition-group-react that referenced this pull request Nov 2, 2022
patrickm68 added a commit to patrickm68/react-transition-group-developer that referenced this pull request Dec 1, 2022
shaikdev2 pushed a commit to shaikdev2/transition-group-react that referenced this pull request Jun 9, 2023
GreenCat1996 added a commit to GreenCat1996/react-transition-group that referenced this pull request Aug 1, 2023
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

Successfully merging this pull request may close these issues.

None yet

4 participants