Skip to content

fix: resolve dependency issues - #11751

Open
merceyz wants to merge 5 commits into
react:mainfrom
merceyz:merceyz/fix/missing-dependencies
Open

fix: resolve dependency issues#11751
merceyz wants to merge 5 commits into
react:mainfrom
merceyz:merceyz/fix/missing-dependencies

Conversation

@merceyz

@merceyzmerceyz commented Dec 14, 2021

Copy link
Copy Markdown
Contributor

What's the problem this PR addresses?

The project created by create-react-app@5.0.0 has dependency issues.

How did you fix it?

  • Add @babel/plugin-proposal-private-property-in-object as a dependency to babel-preset-react-app
  • Add @types/testing-library__jest-dom to the typescript template to fix typechecking under strict dependency environments
  • require.resolve the PostCSS plugins
  • require.resolve the Jest watch plugins
  • Add typescript as an optional peer dependency to eslint-config-react-app

@giulianf

Copy link
Copy Markdown

is there any deadline for this version 5.0.1?

@AndyDyer

Copy link
Copy Markdown

+1

@aramis-it

Copy link
Copy Markdown

How to use it before release?

@blu3r4y

Copy link
Copy Markdown

How to use it before release?

Add the missing dependency in your .yarnrc.yml file, see the comment by @llimos here: #11793 (comment)

Additionally, I did yarn add -D @types/testing-library__jest-dom to also fix typechecking errors.

@merceyzmerceyz changed the title fix: add missing dependenciesfix: resolve dependency issuesJan 24, 2022
@merceyz
merceyzforce-pushed the merceyz/fix/missing-dependencies branch from 7076f9d to 6807108CompareJanuary 24, 2022 13:48
@jakeklassen

Copy link
Copy Markdown

Anyone know how I can use this before release with pnpm? I am seeing errors with @babel/plugin-proposal-private-property-in-object

@@ -143,9 +143,9 @@ module.exports = function (webpackEnv) {
config: false,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also need to specify the path to the postcss:

{// Options for PostCSS as we reference these options twice// Adds vendor prefixing based on your specified browser support in// package.jsonloader: require.resolve('postcss-loader'),implementation: require.resolve("postcss"),options: {postcssOptions: {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not necessary, postcss-loader declares postcss as a peer dependency so it will get it from the parent (react-scripts) on its own.

@await-ovoawait-ovoApr 13, 2022

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your reply, the problem I'm having is that under node_modules is postcss v7, but plugins like postcss-flexbugs-fixes depend on postcss v8, which causes errors when compiling.

So I think it might be better to specify implementation.

@merceyz
merceyzforce-pushed the merceyz/fix/missing-dependencies branch from 3a1eb28 to 074bf9cCompareDecember 11, 2022 13:18
@indutny

Copy link
Copy Markdown

Could this be merged?

@hellenfc

Copy link
Copy Markdown

Issue still existing, can this be merged?

@MuyangAmigo

Copy link
Copy Markdown

Can this fix be merged?

@briandiaz

Copy link
Copy Markdown

News on this?

@duereg

Copy link
Copy Markdown

I'm pretty sure this project is no longer maintained

@giulianf

Copy link
Copy Markdown

I'm pretty sure this project is no longer maintained

I think you right.
Maybe there is an alternative? It's worrying to see such project not followed

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

babel-preset-react-app dependency error - Yarn 3

14 participants

@merceyz@giulianf@AndyDyer@aramis-it@blu3r4y@jakeklassen@indutny@hellenfc@MuyangAmigo@briandiaz@duereg@await-ovo@iansu@facebook-github-bot