Technology
This is the official technology community of Lemmy.ml for all news related to creation and use of technology, and to facilitate civil, meaningful discussion around it.
Ask in DM before posting product reviews or ads. All such posts otherwise are subject to removal.
Rules:
1: All Lemmy rules apply
2: Do not post low effort posts
3: NEVER post naziped*gore stuff
4: Always post article URLs or their archived version URLs as sources, NOT screenshots. Help the blind users.
5: personal rants of Big Tech CEOs like Elon Musk are unwelcome (does not include posts about their companies affecting wide range of people)
6: no advertisement posts unless verified as legitimate and non-exploitative/non-consumerist
7: crypto related posts, unless essential, are disallowed
view the rest of the comments
npm install everything --force
Someone please explain this for those of us who make under 100k
Lol. Many times you need 1 function. The "modern" approach is to use a library because it means someone else is maintaining and testing (ha!) the code. So instead of making your own complete with your own bugs, you install a library that does this thing.
But it generally doesn't just do one thing. It probably does 30 things. And that library was built on the same principle. So it needs 6 or 7 or 20 libraries itself to do its 30 things. And those need 20 more libraries to do their things. Etc.
Npm is a package manager. It installs the dependencies you need, as well as recursively installing the dependencies they need, etc. On a new project this can take a very very long time. And the force because of course none of the packages are maintained and they all have dependency violations between them but you just ignore the warnings and soldier on. Including a bunch of code that may or may not explode at any time because it's easier.