-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
PIN YOUR DEPENDENCIES (Or how I broke CRA for everyone today) #11906
Comments
Thank you @shellscape for sharing what happened so quickly here 🙏 A committed So a pinned version of CRA does produce consistent output. CRA could bake a |
It's something, but that won't help folks who use pnpm or yarn without explicitly importing the lockfile. Ideally, at the very least CRA should pin any critical dependencies in |
FWIW, won't deprecating this version work? Or even contacting NPM to remove it, if it's within 24 hours and you have good reasons to? |
yep, classic cra issue #7709 UPDATE no code changes, just another build and boom 💥! so annoying please, cra team fix the dependencies!! |
@shellscape Looks like CRA has its dependencies unpinned very recently. check the related PR. also |
@jjavierdguezas I ran into this problem today as well, with lots of the following error
Although my project didn't have I included the most recent version as a direct dependency and it seems to be okay for now - perhaps not an ideal solution but at least allows me to get on with other things.
|
Updated react to 17. Removed several unused dependencies. Removed some ESLint rules that conflict with prettier. Also moved some Create React App dependencies up to package.json as per facebook/create-react-app#11906 and facebook/create-react-app#11474. Updated the .eslintrc.json file to reflect updates to ESLint and babel. Also removed package-lock.json to prevent confusion. Pain.
Yes, please pin your dependenices 🙏 We have other problem - after each packages patch update, we wait 10 - 24 hours, when our private registry pull new package versions 😞 So, now we have problem with babel packages:
Yeah, we know thats problem solve via package/yarn lock files, but sometimes we updating our packages or erase package-lock |
Please don't do this. Pinned versions solve this issue but create another one.
-> no one can resolve this issue without you taking action The only real effect pinning versions will have is that you will have more maintenance chores. |
@romainmenke I think one of the major reason to not pinning dependencies is project can be himself using the same dependencies, so when dependencies is pinng it can be broke project By other side, we can't garantie to reproduction (deterministic) build https://12factor.net/dependencies Yes, thats tradeoff, and after a while I changed my mind - better will be if we don't pin dependenices |
Is your proposal related to a problem?
Sure is. I'm the maintainer of webpack-manifest-plugin and I bricked create-react-app for a few minutes this morning. Turns out that npm had one of those very rare
npm pack
hiccups and a version snuck out to the registry without any dist code.Describe the solution you'd like
Pin your dang dependencies, people! This project is big enough and used by enough people (especially the legions of newbies who don't know how to diagnose or triage dependency issues) that this project should not be using transitive dependencies for critical pieces of library architecture. This
create-react-app/packages/react-scripts/package.json
Line 76 in 221e511
CRA won't start up if webpack-manifest-plugin is hosed. And it was. So it was effectively bricked.
Describe alternatives you've considered
Pray to the Flying Spaghetti Monster (didn't work)
Additional context
Given the issues that we've seen recently, and most recently with
colors.js
bricking the world, this seems wise to resolve. I'd bet there are a bunch more critical deps that won't allow CRA to start up should something be awry as well.The text was updated successfully, but these errors were encountered: