[{"data":1,"prerenderedAt":267},["ShallowReactive",2],{"project-15718337":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":39,"post_text":41,"what":42,"said":59,"maker_in_thread":144,"shape":146,"grid":150,"attempts":229,"same_week":230,"maker_shows":220,"maker_hidden":260,"reader_version":261,"card":262},"15718337","Quickfix","The best stupid idea for fixing problems in Node modules","title","Show HN: Quickfix, the best stupid idea for fixing problems in Node modules","https:\u002F\u002Fgithub.com\u002Fmaxchehab\u002Fquickfix#quickfix","github.com","flaque",1510883190,2017,61,33,696,2242,32,"notable","dev_tools","package management patching","cli",[24,25,26,27],"node modules","npm patch","dependency patching","node.js","roasted",-0.2,{"positive":31,"neutral":32,"mixed":33,"critical":34},2,3,0,5,10,{"idea":37,"design":38},{"positive":31,"critical":32},{"positive":33,"critical":31},[33,33,33,33,33,33,33,33,33,40,32,33,33,40,32,34,40,33,33,32,34,33,33,33,33,33,33,33,33,40,33,40,33],1,null,{"problem":43,"audience":41,"pricing":41,"motivation":41,"time_to_build":41,"stack":57,"openness":58,"stage":58,"team_size":58},{"value":44,"source":45,"evidence":46},"Fixing bugs in Node module dependencies quickly","inferred",[47,49,53],{"id":48},"post",{"id":50,"by":51,"text":52},"15719446","nautical","We had same issue and we used diff and patch.",{"id":54,"by":55,"text":56},"15722147","zbentley","That's basically all this is, but with fewer commands to remember and modify. I think that's quite useful, especially when under lots of time pressure.",[],"unknown",{"praise":60,"objections":73,"requests":107,"questions":108,"alternatives":116},[61],{"value":62,"source":63,"evidence":64},"Clever and funny idea that could be useful in practice","commenter",[65,69,70],{"id":66,"by":67,"text":68},"15721669","rendall","Clever and funny. I might find this useful for broken Typescript typings that have been somehow included in the package.",{"id":54,"by":55,"text":56},{"id":71,"by":55,"text":72},"15722160","That is a very concise way of saying something I've struggled to articulate well in the past. Sometimes stuff like this is a horrible idea. Sometimes you need it. If you lock out…",[74,85,99],{"value":75,"source":63,"evidence":76},"Patches to node_modules are fragile and break when dependencies change",[77,81],{"id":78,"by":79,"text":80},"15719292","partycoder","A safer way in my opinion is to: 0. read module license 1. checkout the module to be patched 2. modify it 3. do \"npm pack\" to save a tarball 4. set the dependency version in your…",{"id":82,"by":83,"text":84},"15719626","arthurcolle","This is a terrible idea and I encourage you to consider the slipperiness of this slope",{"value":86,"source":63,"evidence":87},"Committing or forking dependencies is a safer approach",[88,92,96],{"id":89,"by":90,"text":91},"15719731","limsup","Check in your node_modules. You are badly correcting the wrong problem. npm repo should not be hit for every checkout, deploy, and CI test. Just commit your dependencies - and if…",{"id":93,"by":94,"text":95},"15721399","Benjamin_Dobell","One of the really nice things about NPM (and other modern source-level dependency managers) is that it's trivial to fork dependencies and reference commits in remote Git…",{"id":97,"by":94,"text":98},"15721785","You have three options: 1. Fork every dependency in the chain. Which typically isn't more than two or three dependencies. 2. Fork the distant dependency, and specify it as a…",{"value":100,"source":63,"evidence":101},"Promotes bad practices and licensing risk",[102,103],{"id":78,"by":79,"text":80},{"id":104,"by":105,"text":106},"15721486","fiatjaf","Oh, that's terrible, awful, the worst idea ever! You're promoting bad practices, the quality of code will only get worse from now on! Someone needs to delete this thread! You…",[],[109],{"value":110,"source":63,"evidence":111},"How does it work for transitive dependencies?",[112],{"id":113,"by":114,"text":115},"15721684","Sujan","How (well) does this work in a dependency of a dependency of a dependency?",[117,128,135,140],{"value":118,"source":63,"evidence":119},"pnpm hooks and overrides",[120,124],{"id":121,"by":122,"text":123},"15722658","andreineculau","Leaving aside the comedic factor, albeit problem-solving, if you want a sane alternative check out pnpm. It will not only make the installation of deps faster but it will also…",{"id":125,"by":126,"text":127},"15725138","zkochan","Actually, I have written an article about this when the feature was added to pnpm: Why package managers need hook systems…",{"value":129,"source":63,"evidence":130},"Yarn resolutions field",[131],{"id":132,"by":133,"text":134},"15723016","exogen","That’s an interesting approach to it (modifying how the package.json is processed). If anyone is wondering if their current package manager supports this, it does if you are…",{"value":136,"source":63,"evidence":137},"diff and patch, or npm pack tarballs",[138,139],{"id":50,"by":51,"text":52},{"id":78,"by":79,"text":80},{"value":141,"source":63,"evidence":142},"Forking dependencies via git references",[143],{"id":93,"by":94,"text":95},{"comments":33,"answered":33,"key":145},[],{"commenters":147,"max_depth":34,"maker_replies":33,"first_comment_mins":148,"lifespan_hours":149},24,239,18,[151,153,157,160,162,165,167,168,170,171,173,177,179,180,181,184,186,187,190,192,195,197,199,202,205,208,210,212,215,218,223,225,227],[78,33,33,152,79,33],"other\u002Fcritical\u002Fidea",[154,33,33,155,156,33],"15719726","commenter\u002Fneutral\u002Fnone","charlesetc",[158,33,33,155,159,33],"15719777","jogjayr",[161,33,33,155,79,33],"15719796",[163,33,33,155,164,33],"15721969","drostie",[121,40,33,166,122,33],"other\u002Fneutral\u002Fnone",[132,40,33,166,133,33],[169,40,33,166,122,33],"15725143",[125,40,33,166,126,33],[104,31,40,172,105,33],"project\u002Fcritical\u002Fidea",[174,31,32,175,176,33],"15723139","maker\u002Fneutral\u002Fnone","maxchehab",[93,32,33,178,94,33],"other\u002Fneutral\u002Fidea",[113,32,33,166,114,33],[97,32,40,172,94,33],[50,182,32,183,51,33],4,"project\u002Fneutral\u002Fidea",[54,182,34,185,55,33],"project\u002Fpositive\u002Fidea",[82,34,40,172,83,33],[188,34,33,155,189,33],"15719696","skrebbel",[71,34,33,191,55,33],"commenter\u002Fpositive\u002Fidea",[193,34,32,183,194,33],"15721237","jchw",[66,196,34,185,67,33],6,[89,198,33,152,90,33],7,[200,198,33,155,201,33],"15719913","shabbyrobe",[203,198,33,152,204,33],"15721078","orf",[206,198,33,155,207,33],"15721391","mattwad",[209,198,33,152,204,33],"15722027",[211,198,33,152,55,33],"15722202",[213,198,33,152,214,33],"15719949","dissent",[216,198,33,152,217,33],"15723257","denisw",[219,220,40,221,222,33],"15720879",8,"project\u002Fcritical\u002Fdesign","jwilk",[224,220,33,155,194,33],"15721233",[226,220,40,221,222,33],"15721383",[228,220,33,155,55,33],"15722212",[],[231,236,241,246,251,256],{"id":232,"name":233,"points":234,"category":235},"15739744","Harvest Signal",572,"consumer_social",{"id":237,"name":238,"points":239,"category":240},"15757844","LogoFox",431,"creative",{"id":242,"name":243,"points":244,"category":245},"15761537","Gophercises",328,"learning_science",{"id":247,"name":248,"points":249,"category":250},"15736090","Boltzmann Machines",201,"ai",{"id":252,"name":253,"points":254,"category":255},"15759014","OhMyCo.in",167,"finance_crypto",{"id":257,"name":258,"points":259,"category":240},"15720448","Chord Progressions",161,false,"v2",{"id":263,"name":5,"line":6,"ai":260,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":264,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":265,"url":9,"mix":266,"praise":62,"objection":75,"sub":21},15718337,[24,25,26,27],"000000000130013510035000000001010",[31,32,33,34],1794036560908]