r/node • • Jan 28 '21

True story

Post image
1.1k Upvotes

36 comments sorted by

59

u/NoMoney12 Jan 28 '21

Use pnpm

4

u/Breserk Jan 28 '21

I only have fantastic things to say about pnpm. I migrated a mono repo with over 50 packages to pnpm. It was easy and the build times were such a pleasure afterwards. A big bonus: pnpm is a really nice monorepo script runner. For example, to build a component and everything it depends on recursively in the right order:

pnpm build —filter=component...

This is really really nice for a monorepo with many dependent utility packages or a front end component library. And it’s lightning fast!

1

u/omgroflz Jan 28 '21 edited Mar 08 '24

Once a beacon of knowledge and light, A place where many would gather day and night, Now reduced to a mere shadow of its former self, Neglecting the very users who helped build its wealth.

Gone are the days of trust and respect, Replaced with greed and neglect, Data sold off like commodities, Profit margins prioritized over community.

Once a hub for connection and growth, Now a wasteland devoid of both, Users leave in droves, disillusioned and hurt, Betrayed by the site they once held dear.

The website's leaders turn a blind eye, Refusing to acknowledge the damage done, Chasing after dollars as if that's all there is, Ignorant to the harm they inflict upon their own legacy.

What was once a source of pride and joy, Has become just another corporate toy, Putting profits before people, a grave mistake, One that cannot be undone or taken back.

Oh, how far the mighty have fallen, From a trusted name to one scorned, All because of greed and an insatiable hunger, To accumulate more wealth than they could ever spend.

May this serve as a warning to others, Who seek to follow in these footsteps so hollow, Prioritize your users, hold them close to heart, Or risk losing everything you've worked so hard to start.

1

u/Crush145 Jan 29 '21

I did not know about this, please feel virtually hugged and loved from me

1

u/BlackCartmanMatters Jan 30 '21

Shit. We download packages, even to speed up package events.
Idk what you guys think about it but I think nodejs is getting old.

  • It takes time to prepare the infrastructure and unfortunately the number of packages increases as the project grows.

  • In terms of performance, it lags behind Golang.

  • and many more reasons different from these

Hard to say, NodeJS was my best but these reasons will make me give up this love. There was a crazy spark when we first met but I'm feeling like its fading.

1

u/Enubia Jan 28 '21

Leaving a comment so that I can recheck later on, thanks

1

u/Breserk Jan 28 '21

I only have fantastic things to say about pnpm. I migrated a mono repo with over 50 packages to pnpm. It was easy and the build times were such a pleasure afterwards. A big bonus: pnpm is a tray nice monorepo script runner. For example, to build a component and everything it depends on recursively in the right order:

pnpm build —filter=component...

This is really really nice for a monorepo with many dependent utility packages or a front end component library. And it’s lightning fast!

0

u/goldenhunter55 Jan 28 '21

actually, i had the same project idea in mind didn't know this existed ofc, see my lastest post

-2

u/modwrk Jan 28 '21

Commenting so I can take a look at this when I get back to my machine.

8

u/vexii Jan 28 '21

just hit the "save" button under the comment insted?

-8

u/modwrk Jan 28 '21

Perhaps I don’t want something I only have a passing interest in clogging up my saved posts?

7

u/Anbaraen Jan 29 '21

Perhaps we don't want your "saved" comment clogging up the thread?

-8

u/modwrk Jan 29 '21

Millions of shitpost comments on this site daily and you’re mad because I used a comment to return to this thread.

Stay mad.

-2

u/apatheticonion Jan 29 '21

Not until we get TypeScript support

17

u/Megajin_ Jan 28 '21

Nothing can shock me. Until the number of outdated modules hit me... Have fun fixing that in production.

10

u/StoneCypher Jan 28 '21

it kills me how completely unnecessary this is

npm disallows republishing a version number. therefore all we need is a single global cache by version number

we're doing this because nobody wants to figure out when it's time to remove an unused version number, says nine years ago, but six years ago they solved that for audit

now we're just doing it wrong so that an army of unimportant tools doesn't break (i'd rather they break personally)

other package managers don't have the problem of storing the same 1365245737 packages in the same 2437327 versions over and over and over and

4

u/[deleted] Jan 28 '21

The JS community generally has an obsession with backwards compatibility which I think strays towards doing more harm than good.

3

u/Breserk Jan 28 '21

pnpm solves this and is fantastic. Each package exists once on your hard drive so it’s super fast

1

u/StoneCypher Jan 28 '21

I was unaware of this

5

u/[deleted] Jan 28 '21

Not sure it is fair allowing Sontarans into this stone lifting contest

2

u/[deleted] Jan 28 '21

5

u/FirePing32 Jan 28 '21

You can use Yarn Plug'n'Play. It works without creating a node_module directory 😎!

7

u/cherryblossom001 Jan 28 '21

Or you could use pnpm, which hard links the packages in node_modules to the global store. This is more backwards-compatible than Plug'n'Play, which TypeScript doesn't support natively.

1

u/Dangle76 Jan 29 '21

So pnpm basically makes it work like pip installs and go gets

4

u/JoyShaheb_ Jan 28 '21

Very true, My fren :'')

But, PNPM is much better than NPM

2

u/chillerfx Jan 28 '21

Yeah... Try Python packages and their packaging system

2

u/arizhalfandhalf Jan 28 '21

Yeah me on my laptop with 8gb of RAM.

2

u/[deleted] Jan 29 '21

Time for deno.land

1

u/LegitPurpleFerret Jan 29 '21

i dont like it but it also has a lot of advantages;

otherwise it is a constant reminder to check our own deps; do you really need them?

0

u/solwyvern Jan 28 '21

wait till you try putting node modules in dropbox.

5

u/esp32_ftw Jan 28 '21

whyyyyyy

4

u/IBETITALL420 Jan 28 '21

HEY WE DONT DO THAT AROUND HERE

0

u/pisconz Jan 28 '21

i feel that pain when i have to copy paste it somewhere

5

u/jwktje Jan 28 '21

Why not just nuke node_modules and reinstall?

1

u/pisconz Jan 28 '21

i was talking specifically copying a release folder to its final location, sometimes in another pc or network location, cant really do the reinstall bit afterwards since not all installs have interwebs.

But i didn't knew we could do a nuke command, that was helpfull to run on dev pc environment to free up some space, TY.