-
-
Notifications
You must be signed in to change notification settings - Fork 575
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
[TRI-2795] Add bun support #1191
Comments
Just in case anybody else needs this, I was hitting version mismatch errors after updating the sdk package (with Otherwise with bun everything works pretty seamlessly, here's what I did:
import type { TriggerConfig } from '@trigger.dev/sdk/v3';
export const config: TriggerConfig = {
project: 'project id as found under project settings on https://cloud.trigger.dev',
logLevel: 'log',
retries: {
enabledInDev: true,
default: {
maxAttempts: 3,
minTimeoutInMs: 1000,
maxTimeoutInMs: 10000,
factor: 2,
randomize: true
}
},
triggerDirectories: ['./trigger'],
};
import { logger, task, wait } from '@trigger.dev/sdk/v3';
export const helloWorldTask = task({
id: 'hello-world',
run: async (payload: any, { ctx }) => {
logger.log('Hello, world!', { payload, ctx });
await wait.for({ seconds: 5 });
return {
message: 'Hello, world!'
};
}
}); You can now run it with |
@cellulosa What framework are you using here? bunx trigger.dev@beta dev seems to have problems picking up the default nextjs install which creates a src/jobs folder, despite correctly changing the trigger directory in the config. It seems the default nextjs install doesn't even make a trigger.config.ts file but when you bunx it looks for it. Maybe I'm missing something here? |
You' re right I should have said... I'm working with sveltekit |
This does not work for me either |
Currently if you use bun it actually just uses npm (we detect a bun lock file and fallback to using npm).
Adding official bun support would mean you could call postinstall scripts using bun and do other bun specific things. As bun is a package manager and a runtime there are various levels of support we could go to.
TRI-2795
The text was updated successfully, but these errors were encountered: