They are different, but both should work fine. As nx is installed locally you can run it with pnpm exec nx .... All of the mentioned npx commands work fine with this.
Broadly experienced dev and tech writer, working remote, now learning Rust to return to systems programming. Favs: Rust, TypeScript, Node.js, Flutter/Dart, VSCode
To run tasks in dependency order. For example, pnpm does not know which workspaces have to be built before other workspaces. Order can matter when one workspace depends on the outputs generated by another, such as .d.ts files, web bundles, or generated schema interfaces.
Running that should give you the same result, and nx is doing all the other parts, right? I don't see why in these cases two package managers should be used. Maybe I missed something?
You are right on the dependency order with pnpm, but isn't that nx job?
Broadly experienced dev and tech writer, working remote, now learning Rust to return to systems programming. Favs: Rust, TypeScript, Node.js, Flutter/Dart, VSCode
This was a nice read, and I definetly try it out in deep in the next days.
One think is irritating: Why do you use
npx
when you usedpnpm
? (I see that more and more in posts related to pnpm)There are two other options how you can run this with pnpm:
They are different, but both should work fine. As nx is installed locally you can run it with
pnpm exec nx ...
. All of the mentionednpx
commands work fine with this.To run tasks in dependency order. For example, pnpm does not know which workspaces have to be built before other workspaces. Order can matter when one workspace depends on the outputs generated by another, such as
.d.ts
files, web bundles, or generated schema interfaces.I meant commands like:
npx nx affected:<target>
Could be:
pnpm exec nx affected:<target>
Running that should give you the same result, and nx is doing all the other parts, right? I don't see why in these cases two package managers should be used. Maybe I missed something?
You are right on the dependency order with pnpm, but isn't that nx job?
Oh, sorry. I read that as "why use nx rather than pnpm?" I too find it easier to type
npx
rather thanpnpm exec
.