#Prod Blocked: npx trigger.dev@latest deploy cannot find trigger.config.mjs

1 messages · Page 1 of 1 (latest)

lavish questBOT
#

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

#

Hmm, I don't know enough to give you a confident answer yet. It seems like there might be an issue with the path resolution on Windows when using pnpm dlx trigger.dev@latest deploy. This could be related to how paths are handled in the trigger.config.ts file or the deployment process.

To troubleshoot this issue, you might want to check the following:

  1. Ensure that your trigger.config.ts file is correctly configured and located in the expected directory. You can refer to the configuration documentation for more details on setting up this file.

  2. Verify that the paths specified in your configuration file are correct and accessible from your environment.

  3. Consider using the --log-level debug option with the deploy command to get more detailed logs, which might help identify the issue. You can find more about this in the troubleshooting documentation.

If the problem persists, you might want to reach out to the Trigger.dev community or support for further assistance. You can join their Discord for more help.

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

#

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

gaunt kite
#

FIXED: Like always, having a space in your dir path causes this to fail. I'll leave this here just in case

TL;DR on multiple projects, including a test project from scratch, npx trigger.dev@latest deploy fails with this error.

Summary

Deployment to Trigger.dev fails with a module resolution error. The system is looking for trigger.config.mjs but only finds trigger.config.ts, causing the deployment process to fail.

Description

When running npx trigger.dev@latest deploy, the build process initially proceeds normally but ultimately fails with the following error:

Error: Cannot find module '/app/WEB%20PROJECTS/fabian/wow-behemoth-turbo/apps/backend/trigger.config.mjs' imported from /app/Users/dougs/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/entryPoints/deploy-index-worker.mjs'

The root cause appears to be a mismatch between our TypeScript configuration file (trigger.config.ts) and the ESM module that Trigger.dev is attempting to import during deployment (trigger.config.mjs).

#

Triage needed: trigger.dev@latest deploy cannoy find trigger.config.mjs

#

@lavish quest try again

lavish questBOT
#

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

#

I apologize, but I don't have enough context to "try again" or provide a different answer without more specific information about what you'd like me to address. The previous question was about a bug with the trigger.dev@latest deploy command on Windows, and I provided some general troubleshooting steps.

If you have a new question or would like clarification on a specific aspect of Trigger.dev, please feel free to ask, and I'll do my best to assist you based on the available information. Remember, I'm specialized in answering questions about Trigger.dev, so please keep your questions related to this topic.

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

#

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

gaunt kite
#
│
│  Building version 20250305.18: #18 DONE 0.1s
│
│  Building version 20250305.18: #19 [indexer 1/2] WORKDIR /app
│
│  Building version 20250305.18: #19 DONE 0.1s
│
│  Building version 20250305.18: #20 [indexer 2/2] RUN node /app/Users/dougs/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/entryPoints/deploy-index-controller.mjs
│
│  Building version 20250305.18: #20 1.049 Failed to index deployment {
│
│  Building version 20250305.18: #20 1.049   name: 'Error',
│
│  Building version 20250305.18: #20 1.049   message: "Cannot find module '/app/WEB%20PROJECTS/fabian/wow-behemoth-turbo/apps/backend/trigger.config.mjs' imported from /app/Users/dougs/AppData/Local/npm-cache/_npx/f51a09bd0abf5f10/node_modules/trigger.dev/dist/esm/entryPoints/deploy-index-worker.mjs",
#

Prod Blockere: npx trigger.dev@latest deploy cannot find trigger.config.mjs