Open TheWrightDev opened 4 months ago
I am experiencing the exact same issue. Our nx workspace is not in the root of our git repo. Followed the exact same steps as @TheWrightDev above and am now stuck at the same step. We are however using Azure Devops.
@StalkAltan Is there any resolution for this or maybe a work around?
Hi there. We are experiencing the same limitation. I created a install-node-modules
step with a working_directory
input in AdelanteFinancialHoldings/nx-cloud-workflows. But the agents tasks execution expects the workspace to be at the repository root.
To use that step you need to create a custom launch template and set the right working directory. @nixallover, I'd say that to avoid going through modifying each launch template for this purpose, a --working-directory
arg for the nx-cloud start-ci-run <...>
command would be an easy way for most users.
I am also in the same boat as the rest of you. I want to move my existing nx monorepo to a subfolder /frontend
in order for me to add backend stuff in another folder - and eventually tie everything together using nx. But because of this issue, I am not able to get distribution working in my Github workflow.
Hi folks, sorry for the delayed response. This is an issue that the Nx Cloud team is aware of. We don't have a workaround right now but the work to get Nx Agents working with workspaces in subfolders will be scheduled soon, I'll keep this thread updated. Thanks for your patience!
@nixallover Any progress updates of this feature coming to Nx soon? We also use a monorepo with different folders and are currently blocked as Nx Agents can't be configured to run outside of root. We tried the same workaround that @sebastiandg7 proposed but the result is the same as in the screenshot he shared
Current Behavior
When trying to enable distribution with nx agents the workflow no longer works. I believe this is due to nx not being configured at the root of the repo. Our repository is structured such the the Nx solution exists under
/client
.Expected Behavior
Enabling distribution wouldn't break a functioning workflow.
GitHub Repo
No response
Steps to Reproduce
Our workflow:
Adding the Nx Cloud Agents step causes a "
Error: Could not find lock file. Please ensure you have a lock file before running this command.
"This seemed to be due to the default launch template's Install Node Modules step expecting to find some form of lock file at the root of the repo, which it wouldn't since it's inside /client.
Followed the steps here to create a custom template: https://nx.dev/ci/reference/launch-templates Modified the steps so now it's making it to the Agent Nx Tasks step where it's now complaining that it
Could not find Nx Cloud Agent binary
. I'm assuming this is also due to it looking in the wrong directory. But sadly not seeing anyway to customize the directory those commands are executed from (beyond simply having the working-directory property which you can see is already on that step).Is there anyway to use Nx Agents with a repository structure like this?
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response