-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Fix the version of all react-scripts dependencies #7709
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
Comments
I have this issue as well. Our team uses a
|
@known-as-bmf if you delete |
Thanks for the report. Sorry you guys are experiencing this. Was an unintended issue caused by a carat dependency on @jjavierdguezas's suggestion is the best solution for those that have the issue. We'll look into if there's anything else we can do on our end in the short term. |
Was about to raise this as a bug myself. It seems react-scripts is looking for |
This fix is not working for me. Deleted package-lock.json, deleted node-modules, updated react-scripts to 3.1.2 then on npm install I get:
I've also tried 3.1.1 and 3.1.0 and all are giving me the same issue. Could anyone advise how to fix this? I've tried installing the peer dependencies but there's a very long chain of them. ** I should also say that I do still get the |
@lilr can you share your |
@lilr Restarting VSCode after regenerating |
I'm delete yarn-lock and node_modules and run yarn. this work. |
@jjavierdguezas Could you please explain what is actual issue? As I understand, if you upgrade yarn upgrade react-scripts@latest
# or
npm install react-scripts@latest But if you're talking about broken SemVer for So yeah, that's the problem, but I'm not sure that we can solve this. Again, by SemVer we should go with next steps:
@ianschmitz What do you think about that? |
@alexandrtovmach you may have pointed out another problem or a better solution I don't know. My issue really is that a working code without modifications should always work (ideally). In this case, our CI/CD pipeline broke between two |
@jjavierdguezas But how your CI downgrade the version of react-scripts from 3.1.2 to 3.1.1? |
@alexandrtovmach It doesn't, as I pointed out we fixed the version of |
Okay I see, so you had an issue without changing version of react-scripts. Hmm... that's strange. |
It means that was a problem with semver on typescript/eslint-plugin side |
I just checked "@types/react-router": "^5.0.3",
"@types/react-router-dom": "^4.3.1",
"@types/webpack-env": "1.14.0",
- "@typescript-eslint/eslint-plugin": "^1.3.0",
- "@typescript-eslint/eslint-plugin-tslint": "^1.3.0",
- "@typescript-eslint/parser": "^1.3.0",
- "tslint": "^5.12.1",
- "tslint-microsoft-contrib": "^6.0.0",
- "tslint-react": "^4.0.0",
"typescript": "^3.3.3"
},
"resolutions": { Here was version installed directly to ts template project, but when it was removed "@typescript-eslint/eslint-plugin" started hoisting from "react-scripts". But it's just theory and I'm not sure about that. |
For my application to run I have to replace react-scripts with version 2.1.8, because both versions 3.2.0 and 3.1.2 give me issues. |
Fixes broken build error message when starting storybook. To reproduce the error you can follow the next steps: ``` $ git clone https://github.com/Luchanso/storybook-cra-ts-example.git $ npm install $ npm run storybook ``` More info (here)[facebook/create-react-app#7709]
I installed peer dependencies like |
Downgrading react-scripts to "3.0.1" will fix the problem for now. |
A solution for those who are still struggling: On my repo I ran Finally, I checked the actual |
I tried creating a new app with my fork which is merged with tag v3.2.0 of react-scripts.
I have everywhere:
Similar versions for /parser and /experimental-utils If everything is using v2.9.0 of typescript-eslint, why am I getting this error? |
I got the exact issue all of a sudden, and everything works perfectly fine yesterday. |
Assuming the devs are working with the latest deps, I upgraded all of the packages with https://www.npmjs.com/package/npm-check-updates to the latest and |
it works, thanks! |
react-scripts ugprade required due to facebook/create-react-app#7709
this is still an issue, i can't deploy a fresh create-react-app application (using |
I finally solved this issue in my case by adding |
Another example why this is so important: minutes ago #8454 |
This is a very tricky problem. Only a lock file can provide some guarantees of a reproducible install. Issues like this we have encountered in the past were often (not always) due to a dependency, of a dependency, of a dependency that changed, of which we have no control over. As you can see the majority of our dependencies are pinned: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/package.json, and yet we still run into these issues from time to time. On the flip side, we've also encountered some issues due to our pinning: #6756 (comment). My recommendation is to always use a lock file. They aren't perfect, but they are the best solution we have at this time. You could also try the zero-installs feature in yarn v2 for a much different take on dependency management: https://yarnpkg.com/features/zero-installs. We'll continue to talk about this among our team. I'll close this for now as there's no immediate action to take. |
Is your proposal related to a problem?
Yes.
In my team, we always remove
package-lock.json
(and add a.npmrc
file withpackage-lock=false
) due to issues in the past. Also we fixed the version ofreact-scripts
to3.1.1
Due to this, when running
npm install
(in CI/CD pipeline for example) we get the specificreact-scripts
package we have in thepackage.json
but some dependencies can be updated too. Those dependencies may be incompatible with the specificreact-scripts
and we get errors when we donpm start
For example some hours ago the
react-scripts
version was 3.1.1 and now is 3.1.2 and now we are getting errors with someeslint
rule (some packages related toeslint
were updated to new versions but ourreact-scripts
is not)How to reproduce today:
1- do
npx create-react-app test --typescript
and wait for the install2- go to
test
folder and removepackage-lock.json
andnode_modules
folder3- go to
package.json
and changereact-scripts
version from3.1.2
to3.1.1
as it was yesterday4- run
npm install
and wait5- run
npm start
then you will get this error:Describe the solution you'd like
Fix the version of all
react-scripts
dependencies and change them only on newreact-scripts
releasesDescribe alternatives you've considered
Update the
react-scripts
version hoping not to break anything(I have also tried to find out the set of packages that changed and specify in my
package.json
the desired version, but that has not worked)Additional context
I would like to have to update the packages only when I want, and not as a result of some dependency of a dependency has been updated and causes errors
The text was updated successfully, but these errors were encountered: