Use the Nx Task Pipeline to Run Commands Within Local Dependencies

Share this video with your friends

Send Tweet

Since dependencies on other local packages in the workspace are really just symlinks to those projects, we'll run into issues if we haven't ran their build script.

We can make sure that this happens automatically by using Nx's task pipeline features. In our nx.json we can add a dependsOn field and set the commands that need to be ran within a project's dependencies.

Konstantinos
~ 2 years ago

Is it possible to use remote cache with different providers (not nx cloud)?

Juri Strumpflohnerinstructor
~ 2 years ago

You could, by providing a different plugin in the tasksRunnerOptions. Now I'm biased ofc, but hooking into Nx Cloud is the best choice and a no-brainer, since it is completely free for open source projects, has 500hrs/month for free (no credit card) for all other projects or on-prem installations if you're a huge enterprise. And then you don't just get the caching aspect, but also the capability of distributing tasks across machines dynamically. Something that's unique to Nx Cloud.

What's the main motivation for trying other providers?