#can't deploy #help

1 messages · Page 1 of 1 (latest)

slim zodiac
#

Hello,

I’m having an issue deploying my trigger.dev project. I’ve tried everything, on different machines. It works in dry run, but fails during the actual deployment:

  • Removed import "dotenv/config" and import "tsconfig-paths/register" from trigger.config.ts
  • Added tsconfig: "./tsconfig.json" in defineConfig
  • Installed trigger.dev as a local dependency instead of using pnpm dlx
  • Created a tsconfig.trigger.json extending the main tsconfig
  • Created a fully standalone tsconfig.trigger.json without extends
  • Added .npmrc with node-linker=hoisted
  • Changed the package.json script to use node_modules/.bin/trigger
  • Cleared the jiti cache (/tmp/node-jiti) and the .trigger folder
  • Added a node-path-fix extension in trigger.config.ts
  • Added build.env.PATH in the config
  • Tried creating a custom Containerfile
  • Downgraded to trigger.dev 4.3.0

I’m still getting the following error:

■  Error: spawn node ENOENT

Error: spawn node ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

└  Aborting deployment

Here are the logs — it’s always the same issue.

If anyone can help, I’d really appreciate it 🙏

runic frigateBOT
#

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

#

The spawn node ENOENT error means the deployment process cannot find the node executable in the system's PATH during the build/deployment phase. This is a runtime environment issue during the actual deploy step.

Based on the knowledge sources available to me, here are the relevant troubleshooting steps I can point you to:

1. Use debug logging to get more details:

npx trigger.dev@latest deploy --log-level debug

This will print detailed information about the deploy process. [CLI deploy command]

2. Use dry-run to inspect the build:

npx trigger.dev@latest deploy --dry-run

This builds the project without deploying, so you can inspect the output and see where things break. [Deployment troubleshooting]

3. Try a local build instead of the remote build provider:

npx trigger.dev deploy --force-local-build

This forces the build to happen locally using Docker, which can help bypass issues with the remote build infrastructure. You'll need Docker and Docker Buildx installed. [Local builds]

4. Ensure version consistency:
Make sure your trigger.dev CLI version matches your @trigger.dev/sdk version exactly. Version mismatches can cause unpredictable behavior and deployment failures. [CLI version pinning]


Unfortunately, the specific error spawn node ENOENT is not directly addressed in the knowledge sources I have access to. Since you've already tried many workarounds, I'd strongly recommend:

#

The Trigger.dev team will be best positioned to diagnose this specific error given the extensive steps you've already tried.

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

#

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

slim zodiac
#

can't deploy #help

#
  1. Dry run completes without any issues
  2. The local build fails with the same error as before
  3. The versions are properly pinned

The logs show that the path resolution is failing:

[externals][auto] Resolve module error {
  path: '@/lib/permissions',
[externals][auto] Resolve module error {
  path: '@/lib/env',
[externals][auto] Resolve module error {
  path: '@/lib/ai/translate-lot',
[externals][auto] Resolve module error {
  path: '@/lib/ai/provider',

But after that, it still says "Successfully built code."