News for hackers. Stuff that matters.
Re:The Frontend Treadmill by fragmede on Thursday March 20, 2025 @09:03AM (#43422610)
Wait, we're supposed to use pnpm now? What happened to yarn? What's wrong with npm? I stop paying attention for six months and even the installer has changed. What's an npx?
Re:The Frontend Treadmill by Secretmapper on Thursday March 20, 2025 @11:26AM (#43424647)
`pnpm` was released back in 2016. It's 9 years old at this point.

I think part of the problem is this thinking that

- you must change things all the time (yarn is still good why switch?)

- the things you change to are somehow really new (pnpm is 9 years old)

Re:The Frontend Treadmill by chrisldgk on Thursday March 20, 2025 @09:18AM (#43422852)
Main difference between all of them is speed. There’s some differences in how npm, yarn, pnpm or bun handle workspaces and hoisting (and stuff like dependency overrides) but if one of them works for you, you rarely have to switch between them.

Edit: also npx is just an alias for npm exec, allowing you to run scripts in npm packages

Re:The Frontend Treadmill by 8n4vidtmkvmk on Thursday March 20, 2025 @12:05PM (#43425078)
No, we're past pnpm and on to bun now
Re:The Frontend Treadmill by coffeebeqn on Thursday March 20, 2025 @01:08PM (#43425875)
Sorry, everyone’s on pyarn now and next month we’re deprecating that for pbun and then starting from scratch with taquito when that doesn’t solve all our perceived problems
Re:The Frontend Treadmill by rclkrtrzckr on Thursday March 20, 2025 @03:22PM (#43427734)
Still using gnu make.
Re:The Frontend Treadmill by fragmede on Friday March 21, 2025 @06:32PM (#43441440)
I'll concede that I've moved to bazelisk over make
Re:The Frontend Treadmill by pcthrowaway on Thursday March 20, 2025 @06:33PM (#43429795)
Bun may be fine for people using it to replace the javascript runtime

As a dependency management toolchain I recommend reading: https://dev.to/thejaredwilcurt/bun-hype-how-we-learned-nothi...

I had some issues with it using it briefly (though it was way faster than other installers I've used)

Re:The Frontend Treadmill by MrJohz on Thursday March 20, 2025 @11:35AM (#43424741)
npm is not deprecated and is a pretty good choice. pnpm is a bit nicer in some details, but it's a nonstandard tool - use it if you're familiar with frontend development enough that you understand the tradeoffs you're making, but otherwise sick with npm.

npx is a tool bundled with node/npm for running commands in isolated environments. It's mostly useful in two situations:

* You want to run a particular NPM-distributed tool as a one-off, and have the tool installed outside of your current project and then uninstalled afterwards. This can be useful for scaffolding or trying out tools released using NPM.

* You have a local project and one of the dev dependencies provides a utility to e.g. lint the code or run a migration. npx allows you to directly call commands installed locally without having to set up `npm run` beforehand.

If you don't know why you need it, you don't need it.

Re:The Frontend Treadmill by diggan on Thursday March 20, 2025 @09:55AM (#43423490)
Well, what's wrong is your mindset, if anything. You're not supposed to do anything. npm still works, it isn't deprecated, and it does more or less the same thing as the others, only that others can be slightly faster.

But if npm/yarn/whatever works for you, just use that thing. The mindset of having to move to whatever "mainstream developers" are using today is what is causing you problem, not that alternative solutions exists in the first place.

Re:The Frontend Treadmill by mplanchard on Thursday March 20, 2025 @09:07AM (#43422682)
Right??? I started out the process trying to stick with yarn and upgrade it to use plug and play for better CI caching, but svelte apparently just does not work with it and will not do so, so I started looking into pnpm.
Re:The Frontend Treadmill by fragmede on Thursday March 20, 2025 @09:17AM (#43422833)
Meanwhile, I had to do some backend thing yesterday, and ended up using the LD_LIBRARY_PATH trick, which was introduced in 1988.

I'm grateful that LLMs are great at writing frontend code for me, though the broader implications are a bit scary.

Re:The Frontend Treadmill by soco on Thursday March 20, 2025 @09:34AM (#43423123)
But can a LLM help writing code for a library released or updated a few months ago, covering the implied breaking changes? With the way they work today, probably not.
Re:The Frontend Treadmill by genuine_smiles on Thursday March 20, 2025 @09:10AM (#43422724)
Yarn is still great. npm is ok. pnpm is a little faster than Yarn but has less features.
Re:The Frontend Treadmill by evrybdygonsrfin on Friday March 21, 2025 @08:15AM (#43434720)
Hardly a deal-breaker; presumably I can just pipe the output to less.
Re:The Frontend Treadmill by tshaddox on Thursday March 20, 2025 @01:51PM (#43426517)
With respect, you almost certainly stopped paying attention for much longer than six months. yarn v2 was a significant rewrite that was released five years ago and a lot of Yarn projects either never upgraded or just switched back to npm (because npm eventually addressed most of the major reasons that yarn was better than npm).
Re:The Frontend Treadmill by switch007 on Friday March 21, 2025 @02:42AM (#43432472)
But first you need corepack because globally installing yarn is BAD

Corepack is marked experimental but trust us bro

oh if you don't have corepack just install it globally (this is fine)

If you do have it, you have to opt into the experiment by running "corepack enable"

So simple