netlify / netlify/cli

Something is definitely wrong when working with monorepos

Open
#7,762 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
1.9k
Forks
474
Avg merge
23h 30m
Merged PRs (30d)
53

Description

Describe the bug

Hi everyone! Thanks a lot for this package and for all the work you’re doing in general!

Somewhere after the 17.36.2 update, something went wrong with monorepos. There was already a separate issue created for this (https://github.com/netlify/cli/issues/6841), and it even looked like it was fixed – but in reality, it took me quite a while to figure out that something is still clearly off.

Steps to reproduce

Let's try deploying the site using the following command, which used to work perfectly back around version 17:

netlify deploy --prod --site whatislove-b --filter packages/whatislove-b --dir packages/whatislove-b/build

Don't pay attention to the project names or anything like that – just treat this as an example.

Image

We'll get an error that tells us to run netlify status. And when we do that, we get another error as well.

Image

But you know what's interesting... If we try to deploy the site using the site ID instead of the site name, everything works perfectly – and we don’t see any "not found" error at all.

netlify deploy --prod --site 12fd... --filter packages/whatislove-b --dir packages/whatislove-b/build
Image

But also, if we use the site name as the identifier and add the --no-build flag, everything works perfectly as well.

netlify deploy --prod --no-build --site whatislove-b --filter packages/whatislove-b --dir packages/whatislove-b/build
Image

I kind of understand why this might be happening – working with workspaces is no simple matter. But I think it's definitely worth improving the error messages you get when dealing with them, because right now they're actually making things even more confusing.

Configuration

No response

Environment

When I run netlify -V, I get:

netlify-cli/23.10.0 darwin-arm64 node-v24.11.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported commands with netlify deploy and netlify status, comparing a site name with a site ID and the effect of --no-build. Trace the monorepo and workspace handling involved in --filter, --site, and --dir; done means the name-based deployment no longer produces the misleading errors or clearly explains the remaining failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.