-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrating 14.5.10 to >=14.6.0 Ignores Nx Configuration in package.json #12735
Comments
Added a repo to easily reproduce to regression in behavior https://github.com/rhermes62/nx-14.6.0-ignores-package.json-config |
Lerna documentation is still referencing using these |
I was looking more through the 14.6.0 release notes, and I think it may be due to this PR. |
I was looking more into how lerna uses nx and it appears to actually be a lerna issue. Lerna is not taking the nx configurations in nested They only look for an This had appeared to be an nx bug originally because nx 14.6.0 added a In reality, the issue was introduced in this commit in lerna 5.6.0. Reported to lerna instead lerna/lerna#3407 |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
We use Lerna with Nx for an NPM monorepo (btw, thanks for taking stewardship of Lerna!).
While trying to upgrade to nx 15 and Lerna 6 from nx 14.4.2 and Lerna 5.1.8, we found our project graph stopped being produced causing tasks to no longer run any of their dependent tasks.
This surfaced itself to us via:
Compared to the original:
We eventually narrowed it down to occurring due to changes between
14.5.10
->14.6.0
of Nx.The problem seemed to occur regardless of which version of Lerna we are running and we simulated it all the way up to Lerna
6.0.1
(current).Whenever attempting to update to any version of Nx >=
14.6.0
, all of those targets in all childpackage.json
'snx
configuration are suddenly ignored which has blocked us from migrating to newer versions of Nx.I checked the release notes of
14.6.0
and nothing immediately jumped out as a root cause for this behavior except potentially(?) this change and maybe something with the executor context getting messed up when using Nx via Lerna.Expected Behavior
The
nx
properties ofpackage.json
files are not ignored when using Nx with Lerna.Steps to Reproduce
Using Lerna
6.0.1
(version doesn't matter from what we tested as long as its >=5.x when Lerna started to support Nx)We use the following
nx.json
in the root directory:And a child package with the
package.json
whosenx
config of:Running
lerna run test
from the root directory used to runbuild
andlint
followed bytest
in Nx <=14.5.10
but after14.6.0
it only runstest
ignoring all of the target dependencies defined in the child package'spackage.json
>nx
>targets
.Should be enough info to reproduce given we debugged this for awhile.
I will also work on spinning up a repo to replicate the issue.Edit: Created a repo with steps to reproduce https://github.com/rhermes62/nx-14.6.0-ignores-package.json-configFailure Logs
Up to and including Nx
14.5.10
Environment
Thanks for any/all help!
The text was updated successfully, but these errors were encountered: