Using Angular v17.3.0 and “@nx/angular”: “18.2.1” in our app.
Perhaps there’s something I’m missing in the nx library, but in terms of “watching” for changes – I have added a new component, but it doesn’t trigger a rebuild when I make modifications on the HTML/ts files.
e.g. npx nx g @nx/angular:component my-test --directory .libsoctave-uisrclibmy-testmy-test
And of course I’ve already served my app with npx nx serve my-web-client
FYI: The existing code DOES trigger changes, but any “untracked” git changes don’t trigger a rebuild.
I wish I knew what I’m missing here. Perhaps something in the nx.json config ?
Here are few things that you can try, I would suggest you to first check the nx.json & workspace.json.
If the above file looks good, try increase the file watching limit.
CHOKIDAR_USEPOLLING=true npx nx serve my-web-client
Additionally try clearing the cache “npx nx reset” I believe these steps should resolve your issue.
Incase you still face issue after clearing your cache, try to track all the changes to git.
“git add .libsoctave-uisrclibmy-testmy-test“
If nothing works try rebuilding manually.
“npx nx build my-web-client“
Hope this helps.
Dipraj Goswami is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1