Comments (3)
@eamon0989 I just encountered this issue today. However, I upgraded my Angular application to Angular 18 / NX 19.3.0 about 3 weeks ago and didn't have any issues deploying until today (no changes to the pipeline or anything).
Adding the --require-explicit-completion to our pipeline seems to have fixed the issue. However, I do wonder why it started happening out of the blue (after 50+ successful builds on Angular 18 / NX 19.3.0).
from nx.
Hi @eamon0989,
While this might not be directly related to your issue, your nx report
shows duplicate packages - you have both @nx/*
in version 19 and @nrwl/*
is version 18 installed. This might be a sign of manual package update being done sometime in the past.
Can you remove all the @nrwl/*
packages and leave just nx
and @nx/*
packages? You should be using yarn nx migrate latest
whenever your need to migrate to latest version. This not only bumps the versions of packages but also automatically runs any necessary migrations scripts.
from nx.
An update for anyone that comes across this issue in the future.
First, the duplicate nx packages: we have always updated nx using npx nx migrate latest
, never manually.
I've taken a look into the duplicate nx/nrwl dependencies, and it seems they come from devDependencies of some of our dependencies. Our package.json
only contains the latest versions of the packages of nx, the older and duplicate versions come from dependencies. I was not aware of this, but apparently it is the default behaviour of yarn
, which we use as a package manager - see https://stackoverflow.com/questions/49530678/why-does-yarn-install-dev-dependencies-but-i-just-need-the-builds.
As for the heartbeat issue, I contacted nx support and they recommended adding the flag --require-explicit-completion
to nx-cloud start-ci-run
. The ci still failed, and I was given this suggestion:
Could you please verify that in the full pipeline, you don't run any Nx targets before the
npx nx-cloud start-ci-run --require-explicit-completion
?
For example, I see that the main job needs [init, api-specs, regenerate]. If any of those other jobs are running Nx commands first, then they will create the nx-cloud run automatically first, without the
--require-explicit-completion
option. The fix for this is to make sure thenpx nx-cloud start-ci-run --require-explicit-completion
command happens before all Nx targets are run in the pipeline.
I commented out the jobs that ran before our main job and the ci passed, it turns out that one of our earlier jobs was using an nx target, causing the nx-cloud to be created. I'm guessing it was nx format:write
.
TLDR: the issue was caused by calling an nx target in a previous job which was starting nx-cloud before we expected it to be started.
Thanks to nx support for helping me debug the issue!
from nx.
Related Issues (20)
- Generate @nx/react:component with tailwind generates styled-components template HOT 1
- Can't upgrade Nx to 19.7.3
- Getting NX error running lint when leveraging typescript-eslint v8 and newer projectService config in eslint config HOT 2
- [Module-Federation] Can't find module sdk/dist/dist/index.cjs.js HOT 1
- Incorrect cache hit if input is output of dependent target
- Release 19.6.6 can break remix filename conventions for ".server" or ".client". HOT 2
- Regression: nx show does not flush output before exiting HOT 1
- nx reset hangs on CI HOT 2
- With version 19.7.4, following the tutorial (dynamic module federation with angular), Nx build fails for remote mf HOT 2
- Running nx build on node project never starts, prints ^[[13;1R HOT 2
- readyWhen option of run-commands executor silently ending tasks
- npx nx g @nx/nest:controller TypeError: Cannot read properties of undefined (reading 'text')
- Incorrect Build Config (dev mode) Used for Production Deployment in Vue 3, Vite, TypeScript Monorepo
- NX MF build failing with ENOENT: no such file or directory, scandir '' HOT 5
- Nx release fails to detect changes if the workspace directory is not the monorepo root directory
- fileMap is missing files after upgrade from v19.4.4 to v19.5.0 HOT 3
- "Maximum call stack size exceeded error" when running dev server using Nx webpack plugins and `buildLibsFromSource`
- Cannot use import statement outside a module error after NX 16.10.0 upgrade
- Nx + Module federation + Angular gives error NG0912 when using ng-zorro-antd HOT 1
- After upgrading to NX 19.7 and above, parallel tasks have started failing with the error: "NX FOREIGN KEY constraint failed."
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx.