Skip to content

bug: Pure type file in trigger folder breaks deployment #1823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
paduc opened this issue Mar 26, 2025 · 0 comments
Open

bug: Pure type file in trigger folder breaks deployment #1823

paduc opened this issue Mar 26, 2025 · 0 comments

Comments

@paduc
Copy link

paduc commented Mar 26, 2025

Provide environment information

System:
OS: macOS 15.3
CPU: (12) arm64 Apple M4 Pro
Memory: 267.28 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v22.12.0/bin/yarn
npm: 11.0.0 - ~/.nvm/versions/node/v22.12.0/bin/npm

Describe the bug

Deploy fails when there is a file that exports only a type in a trigger directory.

TypeError: Cannot convert undefined or null to object
             at Function.keys (<anonymous>)
             at getExportNames (file:///.npm/_npx/b408398ddf001950/node_modules/trigger.dev/src/indexing/registerTasks.ts:76:19)
             at registerTasks (file:///.npm/_npx/b408398ddf001950/node_modules/trigger.dev/src/indexing/registerTasks.ts:28:30)
             at bootstrap (file:///.npm/_npx/b408398ddf001950/node_modules/trigger.dev/src/entryPoints/deploy-index-worker.ts:89:24)
             at file:///.npm/_npx/b408398ddf001950/node_modules/trigger.dev/src/entryPoints/deploy-index-worker.ts:99:49

Reproduction repo

.

To reproduce

Use the default trigger.config.ts file with:

export default defineConfig({
  ...
  dirs: ['./trigger'],
  ...
})

Add a trigger/HelloWorld.ts file with the following contents :

export type HelloWorld = {
    message: string
}

Deploy
npx [email protected] deploy

Additional information

No response

@paduc paduc changed the title bug: bug: Pure type file in trigger folder breaks deployment Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant