WARNING no output files found for task @repo/ui#lint. Please check your `outputs` key in `turbo.json
Verify canary release
- [X] I verified that the issue exists in the latest Turborepo canary release.
Link to code that reproduces this issue
https://github.com/jahands/turborepo-warning-example
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
turbo 2.1.4-canary.9
Describe the Bug
Tasks with no outputs generate a warning like this:
WARNING no output files found for task @repo/ui#lint. Please check your `outputs` key in `turbo.json`
WARNING no output files found for task docs#lint. Please check your `outputs` key in `turbo.json`
WARNING no output files found for task web#lint. Please check your `outputs` key in `turbo.json`
I find this rather annoying
Expected Behavior
Not to print logs complaining of no outputs for tasks that have no outputs defined
To Reproduce
I repro'd this using create-turbo:
pnpm dlx create-turbo@latest
cd ./turborepo-warning-example
pnpm turbo lint
Results in the following logs:
WARNING no output files found for task @repo/ui#lint. Please check your `outputs` key in `turbo.json`
WARNING no output files found for task docs#lint. Please check your `outputs` key in `turbo.json`
WARNING no output files found for task web#lint. Please check your `outputs` key in `turbo.json`
To repro using my repo:
git clone https://github.com/jahands/turborepo-warning-example.git
cd ./turborepo-warning-example
pnpm install
pnpm turbo lint
Additional context
Tested in both canary and 2.2.0 This behavior was introduced in #9236 which looks like it's only supposed to warn when you have outputs defined, not for every task regardless of whether it has outputs defined
On my main monorepo, this is adding >200 warnings to my logs for tasks with no outputs defined :(
@jahands thanks for the report, we'll take a look asap
I get this warning too
turbo 2.2.1
Just encountered the same issue
Can someone point out in the docs how I can disable all warnings?
Can someone point out in the docs how I can disable all warnings?
You can use empty ouputs to disable the warning:
{
outputs: []
}
Can someone point out in the docs how I can disable all warnings?
You can use empty ouputs to disable the warning:
{ outputs: [] }
Doesn't work to me
Can someone point out in the docs how I can disable all warnings?
You can use empty ouputs to disable the warning:
{ outputs: [] }
Well I was looking for a general option to suppress all turbo warnings, not only from a specific task.
I've found out in my case, I can suppress all warnings, including the main issue here. It's in the environment variable docs: https://github.com/vercel/turborepo/blob/bf8fa90dbb69a292ff7bb47f0836258ce9530e29/docs/repo-docs/reference/system-environment-variables.mdx#L21
e.g. TURBO_GLOBAL_WARNING_DISABLED=1 yarn turbo run lint
@psychobolt that setting will disable the warning when global turbo cannot find a locally installed version of turbo to use - it will not globally disable all warnings.
This issue should now be fixed in latest!
I'm getting this warning with Turbo 2.2.3, Node 18.18.2, MacOS Sequoia (ARM).
In my case the build.outputs array has a single entry outside of the project root.
Disappeared for me in v2.3.3
"lint": {},
Is there a way to mark a task's output as optional somehow?
I have a monorepo in which some workspaces output coverage reports and some don't, so I have the following task definition in a global turbo.json:
"test": {
"dependsOn": ["^build"],
"outputs": ["coverage/**"],
"inputs": ["src/**"],
},
Now when I run this, I get this warning for the projects that don't output any coverage reports, but I'm fine with that. Is there a way to mark the expected coverage/ output optional?
I had same issue but for me was simple, had wrong folder name, my one is dist not .dist
"outputs": [".dist/"] -> "outputs": ["dist/"]
This removed that warning for me, FYI, just in case :)
I concur that we need a optional flag for outputs. Sometimes there are parts of the task we want to run but don't output results.