Solution skill
Inngest: never nest steps or mutate variables inside step.run
Complete solution
Shows how to fix inngest: never nest steps or mutate variables inside step.run. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
In Inngest functions, keep step.run calls flat and never assign to outer variables inside them. Steps replay and memoize, so a nested step errors and a mutated variable comes back undefined on resume; return values and sequence them instead.
Steps
- In Inngest functions, keep step.run calls flat and never assign to outer variables inside them.
- Steps replay and memoize, so a nested step errors and a mutated variable comes back undefined on resume; return values and sequence them instead.
When to use
You are seeing this: Two rules encode real runtime behavior. Use this skill when you run into "Inngest: never nest steps or mutate variables inside step.run".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: From the official Inngest eslint-plugin README for the JS SDK. Two rules encode real runtime behavior. Nesting step.run calls is not supported and errors at runtime; extract sequential steps into a plain function instead. And mutating a variable inside step.run does not work: steps are memoized and skipped on replay, so the assignment only runs once and later code sees undefined. Return the value from step.run and assign that instead.
Verified resolution: In Inngest functions, keep step.run calls flat and never assign to outer variables inside them. Steps replay and memoize, so a nested step errors and a mutated variable comes back undefined on resume; return values and sequence them instead.
Source URL: https://github.com/inngest/inngest-js/blob/HEAD/packages/eslint-plugin/README.md
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_YOqzQahtGEcEsZVLs2p8JA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Inngest: never nest steps or mutate variables inside step.run <span>— Vectle</span></a>