#Worker Error Locally

1 messages · Page 1 of 1 (latest)

ornate kestrelBOT
#

Hi @obtuse eagle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The error message:

No loader is configured for ".node" files: node_modules/@xenova/transformers/node_modules/onnxruntime-node/bin/napi-v3/darwin/arm64/onnxruntime_binding.node

indicates that the Trigger.dev build system does not know how to handle native .node files, which are common in packages like onnxruntime-node.

Solution:
You need to tell Trigger.dev's build system to treat this package as external, so it doesn't try to bundle the native code. You can do this by adding the package to the build.external array in your trigger.config.ts file. Here’s how you can do it:

import { defineConfig } from "@trigger.dev/sdk/v3";

export default defineConfig({
  project: "<project ref>",
  // Your other config settings...
  build: {
    external: ["onnxruntime-node"],
  },
});

This configuration will prevent the build system from trying to bundle the native .node files, resolving the error you’re seeing. For more details, see the troubleshooting guide and deployment troubleshooting.

If you continue to have issues, make sure to stop your local dev server, clear the build cache by deleting the hidden .trigger folder in your project, and then restart the dev server. This can help resolve lingering build issuesCommon problems.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@obtuse eagle Kapa.ai is still learning and improving, please let me know how I did by reacting below.

obtuse eagle
#

@ornate kestrel awesome, now while that's fixed I am getting this error now? ```yaml
Trigger.dev (3.3.17)

Key: Version | Task | Run

○ Building background worker…
X [ERROR] No loader is configured for ".node" files: node_modules/@xenova/transformers/node_modules/sharp/build/Release/sharp-win32-x64.node

node_modules/@xenova/transformers/node_modules/sharp/lib/sharp.js:10:27:
  10 │ ...ports = require(`../build/Release/sharp-${platformAndArch}.node`);
     ╵                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] No loader is configured for ".node" files: node_modules/chromadb-default-embed/node_modules/sharp/build/Release/sharp-win32-x64.node

node_modules/chromadb-default-embed/node_modules/sharp/lib/sharp.js:10:27:
  10 │ ...ports = require(`../build/Release/sharp-${platformAndArch}.node`);
     ╵                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X Error: Failed to build
node:internal/process/promises:394
triggerUncaughtException(err, true /* fromPromise */);
^

Error: Failed to build
at bundleWorker (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/build/bundle.js:65:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async runBundle (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/devSession.js:108:30)
at async startDevSession (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/devSession.js:122:26)
at async startDev (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:115:23)
at async devCommand (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:55:29)
at async file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:31:13
at async file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/cli/common.js:54:28
at async wrapCommandAction (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/cli/common.js:40:12)

Node.js v22.12.0

ornate kestrelBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

The error message:

No loader is configured for ".node" files: node_modules/@xenova/transformers/node_modules/sharp/build/Release/sharp-win32-x64.node

means that the Trigger.dev build system is again encountering a native module (.node file), this time from the sharp package. To resolve this, you need to add sharp to the build.external array in your trigger.config.ts file, just like you did for onnxruntime-node.

Here’s how you should update your config:

import { defineConfig } from "@trigger.dev/sdk/v3";

export default defineConfig({
  project: "<project ref>",
  // Your other config settings...
  build: {
    external: ["onnxruntime-node", "sharp"],
  },
});

Any package that installs or builds a native binary (like sharp) should be added to external, as native binaries cannot be bundled. This is explicitly mentioned in the documentation and in the Sharp example guide.

After updating your config, stop your local dev server, clear the build cache by deleting the hidden .trigger folder in your project, and restart the dev server to ensure the changes take effect Common problems.

If you continue to see similar errors for other native modules, add them to the external array as well.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@obtuse eagle Kapa.ai is still learning and improving, please let me know how I did by reacting below.

obtuse eagle
#

@ornate kestrel last question, I have this error, now any idea how I can pinpoint it? ```yaml
Trigger.dev (3.3.17)

Key: Version | Task | Run

○ Building background worker…

■ Error: (node:10692) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
│ (Use node --trace-deprecation ... to show where the warning was created)


■ Error: Failed to obtain server version. Unable to check client-server compatibility. Set checkCompatibility=false to skip version check.


■ Error: Build failed: 400 "Invalid cron expression: Invalid explicit day of month definition"

│ Error: 400 "Invalid cron expression: Invalid explicit day of month definition"
│ at DevWorkerRuntime.initializeWorker (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/workerRuntime.js:153:19)
│ at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
│ at async updateBundle (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/devSession.js:49:13)
│ at async runBundle (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/devSession.js:119:9)
│ at async startDevSession (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/dev/devSession.js:122:26)
│ at async startDev (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:115:23)
│ at async devCommand (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:55:29)
│ at async file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/commands/dev.js:31:13
│ at async file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/cli/common.js:54:28
│ at async wrapCommandAction (file:///C:/Users/clandad/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/cli/common.js:40:12)

ornate kestrelBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Your error message contains several issues, but the most critical one is:

Error: Build failed: 400 "Invalid cron expression: Invalid explicit day of month definition"

This means that one of your scheduled tasks has an invalid cron expression. Trigger.dev validates cron expressions and will fail the build if the syntax is incorrect. To pinpoint and fix this:

  1. Check your scheduled tasks:
    Review the cron property in your schedules.task() definitions and any schedules you create imperatively (via the SDK or dashboard). Make sure your cron expressions follow the supported syntax:

    *    *    *    *    *
    ┬    ┬    ┬    ┬    ┬
    │    │    │    │    └ day of week (0 - 7, 1L - 7L) (0 or 7 is Sun)
    │    │    │    └───── month (1 - 12)
    │    │    └────────── day of month (1 - 31, L)
    │    └─────────────── hour (0 - 23)
    └──────────────────── minute (0 - 59)
    

    Note: Seconds are not supported in the cron syntax. Also, ensure you are not mixing day-of-month and day-of-week fields in a way that is not allowed by standard cron rules.
    Supported cron syntax

  2. Look for typos or invalid values:
    For example, a cron like 0 0 32 * * (day 32) or 0 0 * * 8 (day of week 8) would be invalid.

  3. Check dashboard schedules:
    If you’ve created schedules in the dashboard, double-check their cron patterns as well.

  4. Fix and retry:
    Once you correct the invalid cron expression, re-run your build.

The other errors in your log (e.g., DeprecationWarning for punycode, server version check) are warnings and not build blockers, but you can address them separately if needed.

#

If you’re still unsure which cron is invalid, try commenting out your scheduled tasks and re-enabling them one by one to isolate the problematic one.

For more on cron syntax and troubleshooting, see the Scheduled tasks (cron) docs and Common problems.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@obtuse eagle Kapa.ai is still learning and improving, please let me know how I did by reacting below.

obtuse eagle
#

@ornate kestrel I fixed that issue now, any idea where these errors could be occuring? ```yaml
Trigger.dev (3.3.17)

Key: Version | Task | Run

○ Building background worker…

■ Error: (node:21648) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
│ (Use node --trace-deprecation ... to show where the warning was created)


■ Error: Failed to obtain server version. Unable to check client-server compatibility. Set checkCompatibility=false to skip version check.

○ Background worker ready [node] -> 20250613.6

ornate kestrelBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Based on the knowledge sources, here’s what can be determined about your errors:

  1. DeprecationWarning: The punycode module is deprecated
    This warning is coming from Node.js itself, not directly from Trigger.dev. It means that some dependency in your project (or one of its dependencies) is using the deprecated punycode module. The warning suggests using a userland alternative, but the knowledge sources do not provide specific guidance on how to resolve this within the context of Trigger.dev. This warning does not block your build or worker from running.

  2. Failed to obtain server version. Unable to check client-server compatibility. Set checkCompatibility=false to skip version check.
    This error indicates that the Trigger.dev CLI was unable to fetch the server version to check for compatibility between your local CLI and the server. The knowledge sources mention that you can set checkCompatibility=false to skip this check, but do not provide further troubleshooting steps or causes for this error. It may be related to network issues or misconfiguration, but there is no explicit documentation on this error in the provided sources.

If these errors are not blocking your worker from running (as indicated by "Background worker ready"), you may be able to proceed. For further help, you can join the Trigger.dev Discord for more direct support.

I'm sorry, but the knowledge sources do not contain enough information to provide a more detailed answer about the root causes or solutions for these specific errors.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@obtuse eagle Kapa.ai is still learning and improving, please let me know how I did by reacting below.

obtuse eagle
#

can you give me the new config I would use @ornate kestrel? ```ts
import { defineConfig } from "@trigger.dev/sdk/v3";

export default defineConfig({
project: "",
runtime: "node",
logLevel: "log",
build: {
external: ["onnxruntime-node", "sharp"],
},
// The max compute seconds a task is allowed to run. If the task run exceeds this duration, it will be stopped.
// You can override this on an individual task.
// See https://trigger.dev/docs/runs/max-duration
maxDuration: 3600,
retries: {
enabledInDev: true,
default: {
maxAttempts: 3,
minTimeoutInMs: 1000,
maxTimeoutInMs: 10000,
factor: 2,
randomize: true,
},
},
dirs: ["src/trigger"],
});

ornate kestrelBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Your config looks correct and follows the recommendations from the Trigger.dev documentation. Here’s a reviewed and updated version based on your requirements and the knowledge sources:

import { defineConfig } from "@trigger.dev/sdk/v3";

export default defineConfig({
  project: "proj_dhssgvlggkltiaodearm",
  runtime: "node",
  logLevel: "log",
  build: {
    external: ["onnxruntime-node", "sharp"],
  },
  maxDuration: 3600, // 1 hour, can be overridden per task
  retries: {
    enabledInDev: true,
    default: {
      maxAttempts: 3,
      minTimeoutInMs: 1000,
      maxTimeoutInMs: 10000,
      factor: 2,
      randomize: true,
    },
  },
  dirs: ["src/trigger"],
});

Key points:

  • The external array includes both onnxruntime-node and sharp, which is required for native modules and matches the documentation for handling native binaries Build configuration.
  • maxDuration is set globally, as recommended Max duration.
  • retries and dirs are configured according to best practices Config file.
  • runtime: "node" is the officially supported runtime Runtime.
  • logLevel: "log" is valid and controls which logs are sent to Trigger.dev Log level.

If you need to add more native modules in the future, simply add them to the external array. If you encounter further issues, consult the troubleshooting guide.

#

Let me know if you need help with any other config options!

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@obtuse eagle Kapa.ai is still learning and improving, please let me know how I did by reacting below.

obtuse eagle
#

@ornate kestrel

ornate kestrelBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Sorry @obtuse eagle, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:

Perhaps try again in 15mins?

obtuse eagle
#

@ornate kestrel I meant how do I fix this error: "Error: Failed to obtain server version. Unable to check client-server compatibility. Set checkCompatibility=false to skip version check."

ornate kestrelBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

I'm sorry, but the knowledge sources do not contain enough information to provide a definitive solution for the error:

Error: Failed to obtain server version. Unable to check client-server compatibility. Set checkCompatibility=false to skip version check.

This error suggests that the Trigger.dev CLI is unable to communicate with the server to verify compatibility, but the documentation does not specify the causes or steps to resolve it. Possible reasons could include network issues, misconfiguration, or server availability, but these are not explicitly covered in the provided sources.

If this error is blocking your workflow, you may consider reaching out to the Trigger.dev team via their Discord for further assistance.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@obtuse eagle Kapa.ai is still learning and improving, please let me know how I did by reacting below.

obtuse eagle
#

@ornate kestrel is it possible to clear out runs in my dashboard as it's hard to keep track of the latest ones.

ornate kestrelBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

I'm sorry, but the knowledge sources do not contain information about deleting or clearing out runs from the Trigger.dev dashboard. The documentation covers filtering, tagging, and bulk actions like replaying or canceling runs, but it does not mention a way to permanently remove or clear runs from the dashboard interface. You can filter runs by tags, status, or other criteria to help manage visibility, but actual deletion is not documented as a feature Tags Bulk actions.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: