Skip to main content

Development

EACCES: permission denied

If you see a permission error related to the npm cache:
Error: EACCES: permission denied, rename '/Users/user/.npm/_cacache/tmp/...'
First clear the npm cache:
npm cache clean --force
If that doesn’t help, fix the permissions on the npm directory:
sudo chown -R $(whoami) ~/.npm

Clear the build cache

Stop your local dev server, locate the hidden .trigger folder in your project root, and delete it. Then restart your local dev server:
rm -rf .trigger
npx trigger.dev@latest dev

Yarn Plug’n’Play conflicts

If you see errors like this when running trigger dev:
Could not resolve "@trigger.dev/core"
The Yarn Plug'n'Play manifest forbids importing "@trigger.dev/core" here
Check for a .pnp.cjs file in your home directory — this can be left behind by a previous Yarn PnP installation. Remove it:
rm ~/.pnp.cjs

Deployment

You can diagnose build problems by running the deploy command with extra flags:
# Verbose output (do not share publicly — may contain secrets)
npx trigger.dev@latest deploy --log-level debug

# Build without deploying — inspect output locally
npx trigger.dev@latest deploy --dry-run

Failed to build project image: Error building image

A link to the full build log is printed below the error. Review it to find the root cause. If you need help, share the log privately in our Discord — do not post it publicly as it may contain sensitive information.

Error: failed to solve: failed to resolve source metadata for docker.io/docker/dockerfile:1

This typically happens after uninstalling Docker Desktop, which leaves behind a credential store reference:
error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
Fix it by removing or editing ~/.docker/config.json to remove the credStore key. Docker Desktop is not required to use Trigger.dev.

Deployment encountered an error

There is usually guidance printed below this message. If you can’t resolve it, open a Help post in our Discord with a link to your deployment.

resource_exhausted

The build hit resource limits on the build infrastructure. Try the native builder.

No loader is configured for ".node" files

Native .node files cannot be bundled. Add the package to build.external in trigger.config.ts:
trigger.config.ts
import { defineConfig } from "@trigger.dev/sdk";

export default defineConfig({
  project: "<project ref>",
  build: {
    external: ["your-node-package"],
  },
});

Cannot find module '/app/lib/worker.js' when using pino

Add pino (and any associated packages) to build.external in trigger.config.ts. See the external config docs.

reactDOMServer.renderToPipeableStream is not a function when using react-email

React Email packages have bundling conflicts. Mark them as external:
trigger.config.ts
import { defineConfig } from "@trigger.dev/sdk";

export default defineConfig({
  project: "<project ref>",
  build: {
    external: ["react", "react-dom", "@react-email/render", "@react-email/components"],
  },
});

Failed to index deployment with Column must be greater than or equal to 0, got -1

This can occur when using runtime: "bun" during the indexing phase. A short-term workaround is to pnpm patch the source-map package. See this GitHub issue for the patch details.

Project setup

The requested module 'node:events' does not provide an export named 'addAbortListener'

You’re running an unsupported Node.js version. Minimum supported versions:
MajorMinimum
1818.20+
2020.5+
2121.0+
2222.0+

Runtime issues

Environment variable not found:

Your tasks run in a separate environment from your main application. Any environment variables your tasks reference must be set in the Trigger.dev dashboard. See the deploy environment variables guide.

Error: @prisma/client did not initialize yet.

Prisma relies on code generation. Add the Prisma extension to your trigger.config.ts so the client is generated before your tasks run. See the Build extensions overview.

Database connection requires IPv4

Trigger.dev currently only supports IPv4 database connections. If your database provider provides only an IPv6 address, you’ll need to use a proxy or an alternate connection string.

Parallel waits are not supported

You cannot run more than one “wait” operation in parallel. Waits include:
  • wait.for()
  • wait.until()
  • task.triggerAndWait()
  • task.batchTriggerAndWait()
The most common cause is wrapping wait calls in Promise.all. Instead, use the built-in batch triggering functions which handle parallelism safely.

When triggering subtasks the parent task finishes too soon

Always await calls to trigger, triggerAndWait, batchTrigger, and batchTriggerAndWait. Without await, the task process can terminate before the network calls are sent.

COULD_NOT_FIND_EXECUTOR

This error can occur when child tasks are dynamically imported. The executor registration happens at module load time and can be missed with dynamic imports. Use a static top-level import instead:
import { myChildTask } from "~/trigger/my-child-task";

export const myTask = task({
  id: "my-task",
  run: async (payload: string) => {
    await myChildTask.trigger({ payload: "data" });
  },
});
Alternatively, trigger by ID without importing the task:
import { batch } from "@trigger.dev/sdk";

export const myTask = task({
  id: "my-task",
  run: async (payload: string) => {
    await batch.triggerAndWait([{ id: "my-child-task", payload: "data" }]);
  },
});

Rate limit exceeded

If you’re hitting rate limits, switch from many individual trigger() calls to batchTrigger(). See the rate limits for current quotas.

Runs waiting in queue due to concurrency limits

If runs stay in QUEUED state for extended periods:
  1. Check the Concurrency view in the dashboard to see how many runs are currently EXECUTING or DEQUEUED.
  2. Look for stuck runs in EXECUTING state that may be blocking new work.
  3. Review queue-level concurrencyLimit settings on your tasks.
Solutions:
  • Increase your environment concurrency limit in the dashboard (paid plans)
  • Adjust per-queue concurrencyLimit settings
  • Investigate and resolve stuck runs

Crypto is not defined

Support for globalThis.crypto without a flag was added in Node.js v19. Upgrade to Node 20 or 22 (even-numbered LTS releases), or switch from plain strings to idempotencyKeys.create() for idempotency keys. See the idempotency guide at /wait.

Task run stalled executing

A TASK_RUN_STALLED_EXECUTING error means the platform stopped receiving heartbeats from your task before the 5-minute stall timeout. Heartbeats are sent automatically every 30 seconds.
If this was a dev run, the trigger dev CLI was likely stopped. This is not a code issue.
Common causes:
  • An infinite loop blocking the event loop
  • A CPU-heavy synchronous operation (nested loops on large arrays)
  • Prisma 7.x — query compilation runs on the main thread and can block the event loop during heavy database work
For CPU-intensive tasks, use heartbeats.yield() to periodically yield to the event loop:
import { heartbeats } from "@trigger.dev/sdk";

export const myTask = task({
  id: "cpu-heavy-task",
  run: async (payload: { rows: string[] }) => {
    for (const row of payload.rows) {
      // Only actually yields when necessary — safe to call every iteration
      await heartbeats.yield();
      processRow(row);
    }
  },
});
If the event loop is still being blocked, consider increasing the machine size for the task.

Framework-specific issues

NestJS swallows all errors

NestJS has a global exception filter that catches and swallows errors thrown inside NestFactory.createApplicationContext(). If you use this pattern inside a task, errors will never surface to Trigger.dev:
// ❌ This swallows all errors
export const myTask = task({
  id: "nestjs-example",
  run: async (payload) => {
    const app = await NestFactory.createApplicationContext(AppModule);
    await app.init();
    // ...
  },
});
Our recommendation is to not instantiate the NestJS application context inside tasks. You can still use Trigger.dev with NestJS projects — just avoid this initialization pattern within run.

React is not defined

If you see:
Worker failed to start ReferenceError: React is not defined
Either add the React import:
import React from "react";
Or update your tsconfig.json to use the automatic JSX transform:
{
  "compilerOptions": {
    "jsx": "react-jsx"
  }
}

Getting help

If none of the above resolves your issue:
  • Join our Discord and post in the #help forum
  • When sharing logs, use the private message feature — do not post verbose debug output publicly
  • Include a link to your deployment and the exact error message

Build docs developers (and LLMs) love