turborepo: ignore flag doesn't work

What version of Turborepo are you using?

1.0.23

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Mac

Describe the Bug

turbo run build --ignore='package/path' doesn’t ignore build for package/path

Expected Behavior

turbo run build --ignore='package/path' run build for all packages except package/path

To Reproduce

ignore some package and run build

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 29
  • Comments: 22 (2 by maintainers)

Most upvoted comments

For everyone who experiences this even with the --filter option with a zsh: event not found: error, escape the ! like so: turbo run build --filter="\!@scope/package"

thanks, everything works like a charm with the --filter option

For the time being it looks like this has been fixed in https://github.com/vercel/turborepo/pull/696

I think the --filter syntax will fix this properly but for now it’s possible to use --scope to achieve the desired exclude behaviour.

From the release notes:

Fixed --scope exclusion. As a reminder, a ! is the proper way to ignore something from execution scope (e.g. --scope="!something-*"). Recall that --ignore is only used for --since`.

Still having this issue as well, nothing I’ve tried has successfully been able to ignore individual @org/pkg type packages.

For example, we have a bunch of @next-auth/*-adapter type packages in our /packages directory. I’m trying to run tests like so, turbo run test --scope=@next-auth/*-adapter --ignore=@next-auth/pouchdb-adapter. The goal being, to run all adapters except the pouchdb one. Unfortunately, it will include the pouchdb adapter as well.

Like the the first replier, I’ve tried it with the path name, package.json name field, with and without glob stars prefixed and suffixed, etc. None of them did the trick 🤷

Currently tried it with:

  • turbo@1.1.2
  • node@14.17.1
  • yarn@1.22.16

I posted this originally: https://github.com/vercel/turborepo/issues/398

Still having issues ignoring packages in my build with 1.1.5 unfornunately.

I’m having same issue, ignore does not seem to work.

Using this to negate the scope

 --no-deps --scope='!excluded-app'

Should ignore work without the --no-deps flag? I did try with it and it is still not working.


on mac with ! it even not executes command:

pnpm turbo run build --scope="!webapp"

zsh: event not found: webapp

@morriq Is that not zsh related? try with single quotes

The issue still appears. I wasn’t able to ignore packages using:

  • package name
  • path to folder

agree, basically i would summarize that it would be nice to have an opposite flag for --scope instead of --scope all I want, I can --exclude what I don’t want pnpm turbo run lint --scope="@wow/app" --scope="@wow/web" --scope="@wow/app2" --scope="@wow/web2" i can write pnpm turbo run lint --exclude="@wow/types" exclude can be replaced with ignore/filter or something more clear