error: x could not find task `dev` in project
This looks like a neat little template! Thanks for doing this.
I'm trying to get started with a scrappy little project, but I keep running into an error when using Docker.
After cloning, I run pnpm install and docker-compose watch. I get this error.
2025-01-23 06:11:57
2025-01-23 06:11:57 x missing tasks in project
2025-01-23 06:11:57
2025-01-23 06:11:57 Error: x could not find task `dev` in project
2025-01-23 06:11:57
2025-01-23 06:11:57 ERROR Command failed with exit code 1: turbo run dev --filter=api
2025-01-23 06:11:57
2025-01-23 06:11:57 pnpm: Command failed with exit code 1: turbo run dev --filter=api
2025-01-23 06:11:57 at makeError (/root/.cache/node/corepack/pnpm/8.6.2/dist/pnpm.cjs:24241:17)
2025-01-23 06:11:57 at handlePromise (/root/.cache/node/corepack/pnpm/8.6.2/dist/pnpm.cjs:24812:33)
2025-01-23 06:11:57 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-01-23 06:11:57 at async Object.handler [as dlx] (/root/.cache/node/corepack/pnpm/8.6.2/dist/pnpm.cjs:207055:7)
2025-01-23 06:11:57 at async /root/.cache/node/corepack/pnpm/8.6.2/dist/pnpm.cjs:216461:21
2025-01-23 06:11:57 at async main (/root/.cache/node/corepack/pnpm/8.6.2/dist/pnpm.cjs:216428:34)
2025-01-23 06:11:57 at async runPnpm (/root/.cache/node/corepack/pnpm/8.6.2/dist/pnpm.cjs:216683:5)
2025-01-23 06:11:57 at async /root/.cache/node/corepack/pnpm/8.6.2/dist/pnpm.cjs:216675:7
I get a similar error for the web container.
I've been trying to debug this for a few hours, and it does feel like a case of user error, but I'm not sure what I'm doing wrong here. Any help would be appreciated!
Doing some digging into the container, it appears that turbo.json is empty. Inspecting it in the api container, I get the following.
/app # cat turbo.json
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": [
"**/.env.*local"
]
}
Renaming pipeline to tasks in the root turbo.json appears to fix the issue, though. This is because you've got Turbo set to latest, and this changed with the major version upgrade from Turbo 1.x to Turbo 2.x.
It looked like none of the tasks were getting carried through to the turbo.json files in the container after the turbo prune --scope=api --docker step in the Dockerfiles.
I'll create a PR to change pipeline to tasks.