Be able to run nx print-affected
with npx
for fast CI
#23357
Replies: 5 comments
-
This is an important feature for monorepo tooling, our npm install takes upwards of 4 minutes before we can determine if a task even needs to be run. |
Beta Was this translation helpful? Give feedback.
-
@Lp-Francois I'm trying your workaround, but my
Any idea what's going on? Does nx need to be installed locally in the project to run an affected command? ( Edit to add: This command works fine locally. |
Beta Was this translation helpful? Give feedback.
-
Hey, I am not sure why it doesn't work for you 🤔 Maybe try to add nx in your node_modules before running the workaround? |
Beta Was this translation helpful? Give feedback.
-
The same feature was requested in this closed issue #4710 and #16381 |
Beta Was this translation helpful? Give feedback.
-
We need more discussion on this topic.
|
Beta Was this translation helpful? Give feedback.
-
Description
In CI, we want to be able to determine if some apps were affected by the changes without having to install the node_modules which can be really big in the case of monorepo (in our case 3G)
Motivation
Speed up the CI process and improve Developers experience. Especially with big monorepo, downloading the cached node_modules takes quite some time.
Especially with CI like vercel where it is possible to use a script checking if we should skip the build, running `print-affected fast enough is really helpful.
Related issue: #8448 where running npm install will install the whole node_modules, which we don't want.
Current workaround we found
We moved the package.json and package-json.lock to a .bk extension, installed
nx
and then ran the commandprint-affected
without error.Related issues: from 2 years ago with the deprecated command - #5752
Beta Was this translation helpful? Give feedback.
All reactions