question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-scripts@3.4.1 has higher dependency versions than react-scripts@3.4.3?

See original GitHub issue

Is your proposal related to a problem?

Starting a project with npx create-react-app app-name currently uses react-scripts@3.4.3. I was surprised to see that this brought in the dependency of left-pad. Digging into it further, I noticed that there were several dependencies that were higher-versioned in react-scripts@3.4.1 than they are in @3.4.3. Here’s a table of the dependencies listed in the two package.json versions of react-scripts. In bold are the dependencies that have a higher version listed in 3.4.1.

Dependency React Scripts @3.4.1 React Scripts @3.4.3
@babel/core 7.11.6 7.9.0
@pmmmwh/react-refresh-webpack-plugin 0.4.2 -
@svgr/webpack 5.4.0 4.3.3
@typescript-eslint/eslint-plugin ^4.1.0 ^2.10.0
@typescript-eslint/parser ^4.1.0 ^2.10.0
babel-eslint ^10.1.0 10.1.0
babel-jest ^26.3.0 ^24.9.0
babel-loader 8.1.0 8.1.0
babel-plugin-named-asset-import ^0.3.6 ^0.3.6
babel-preset-react-app ^9.1.2 ^9.1.2
bfj ^7.0.2 -
camelcase ^6.0.0 ^5.3.1
case-sensitive-paths-webpack-plugin 2.3.0 2.3.0
css-loader 4.3.0 3.4.2
dotenv 8.2.0 8.2.0
dotenv-expand 5.1.0 5.1.0
eslint ^7.9.0 ^6.6.0
eslint-config-react-app ^5.2.1 ^5.2.1
eslint-loader ^4.0.2 3.0.3
eslint-plugin-flowtype ^5.2.0 4.6.0
eslint-plugin-import ^2.22.0 2.20.1
eslint-plugin-jest ^24.0.1 -
eslint-plugin-jsx-a11y ^6.3.1 6.2.3
eslint-plugin-react ^7.20.6 7.19.0
eslint-plugin-react-hooks ^4.1.2 ^1.6.1
file-loader 6.1.0 4.3.0
fs-extra ^9.0.0 ^8.1.0
html-webpack-plugin 4.4.1 4.0.0-beta.11
identity-obj-proxy 3.0.0 3.0.0
jest 26.4.2 24.9.0
jest-circus 26.4.2 -
jest-resolve 26.4.0 24.9.0
jest-watch-typeahead 0.6.1 0.4.2
mini-css-extract-plugin 0.11.2 0.9.0
optimize-css-assets-webpack-plugin 5.0.4 5.0.3
pnp-webpack-plugin 1.6.4 1.6.4
postcss-flexbugs-fixes 4.2.1 4.1.0
postcss-loader 3.0.0 3.0.0
postcss-normalize 8.0.1 8.0.1
postcss-preset-env 6.7.0 6.7.0
postcss-safe-parser 5.0.0 4.0.1
react-app-polyfill ^1.0.6 ^1.0.6
react-dev-utils ^10.2.1 ^10.2.1
react-refresh ^0.8.3 -
resolve 1.17.0 1.15.0
resolve-url-loader 3.1.1 3.1.1
sass-loader 8.0.2 8.0.2
semver 7.3.2 6.3.0
style-loader 1.2.1 0.23.1
terser-webpack-plugin 4.2.0 2.3.8
ts-pnp 1.2.0 1.1.6
url-loader 4.1.0 2.3.0
webpack 4.44.1 4.42.0
webpack-dev-server 3.11.0 3.11.0
webpack-manifest-plugin 2.2.0 2.2.0
workbox-webpack-plugin 5.1.4 4.3.1
fsevents - 2.1.2
jest-environment-jsdom-fourteen - 1.0.1

Describe the solution you’d like

Upgrade the dependencies in react-scripts@3.4.3 to be consistent with what versions they were in @3.4.1 (unless these were intentionally lower-versioned between versions of react-scripts… though the changelog seems to suggest that dependencies were only meant to be upgraded, not downgraded).

Describe alternatives you’ve considered

If the downgrading of these versions was intentional, make a note in the documentation/changelog to reflect that. The fact that the version of react-scripts that’s versioned in Github is different than the one that resolves if one uses create-react-app is also very confusing as a user.

Additional context

A few of the issues currently open seem to be related to these changes. https://github.com/facebook/create-react-app/issues/9707 https://github.com/facebook/create-react-app/issues/9737 https://github.com/facebook/create-react-app/issues/8529

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:22 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
gaearoncommented, Oct 7, 2020

Ok this makes sense now. Thanks @danielruf and @AmyShackles for the extra details.

Both 3.4.1, 3.4.2, and 3.4.3 have the “lower” versions. There is no difference between them except for the two packages I mentioned above.

However, the versions you get if you git clone the repo are going to be higher because the master branch is much ahead of what’s on npm. The master branch has no relation to the 3.4.1 release, even though package.json on the master branch still says 3.4.1. This is just because there hasn’t been a release from master since 3.4.1, so the version has not been edited on GitHub since then.

When 4.0.0 is released, the versions on GitHub will match what’s on npm. In the meantime, you’re welcome to try the 4.x beta (4.0.0-next.98) which has the “higher” versions.

1reaction
DanielRufcommented, Oct 7, 2020

No worries. Thanks to this I found the 4.0.0-next.98 pre-release on npm which uses eslint 7 so we could continue with our project. The version string in the package.json file here in the repo and the missing .2 and .3 releases were also confusing to me. So it was very helpful as @gaearon could clear the things up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I downgrade react-scripts 5.0.1 to 4.0.3 - Stack Overflow
Could always delete your node_modules directory and change the version in your package.json under dependencies:
Read more >
3.4.3 - react-scripts - npm
Start using react-scripts in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type declarations.
Read more >
Upgrade Create React App-Based Projects to Version 4 (CRA 4)
By running this command, we upgrade react-scripts from version 3.4.3 to version 4.0.0 smoothly. Here is the difference in package.json :.
Read more >
Dependencies | react-scripts | npm - Open Source Insights
arrow_right @babel/core. 7.9.0 Notes Relation Licenses Version 7.9.0 Published March 20, 2020 Description arrow_right @svgr/webpack. 4.3.3 Notes Relation Licenses Version 4.3.3 Published September 24, 2019 Description...
Read more >
Power up create-react-app! - DEV Community ‍ ‍
(ie. direct dependency instead of through react-scripts ) Templates provide ... At the time of this writing, 3.4.1 is the latest release.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found