Skip to content
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

feat: Ability to change the node version #1468

Open
gorbak25 opened this issue Nov 12, 2024 · 2 comments
Open

feat: Ability to change the node version #1468

gorbak25 opened this issue Nov 12, 2024 · 2 comments

Comments

@gorbak25
Copy link

Is your feature request related to a problem? Please describe.

In a data processing pipeline which uses a lot of grouping operations introduced in node v21 the code fails with.

TypeError: Map.groupBy(...).entries(...).map is not a function

From what I see trigger runs on node v20.

Describe the solution you'd like to see

Allow users to change the node version in their trigger config. I understand that this will increase the testing and maintenance cost a LOT so it's probably not worth implementing.

Describe alternate solutions

  1. Document how to conditionally polifill unavailable features
  2. Warn if one uses too new features unavailable in the runtime

Additional information

No response

@gorbak25
Copy link
Author

gorbak25 commented Nov 12, 2024

For now I've added poly-fills directly to trigger.config.ts

// Add polifills for Node v22
// https://github.com/triggerdotdev/trigger.dev/issues/1468
import 'core-js/actual/iterator';
import 'core-js/actual/object';
import 'core-js/actual/map';

@matt-aitken
Copy link
Member

Thanks, this is useful especially with the polyfills!

We're going to be adding a new runtime option for Node 22 quite soon.

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

2 participants