bug: envvars.update() throws "ReferenceError: name is not defined" outside a task context
メンテナーはふだん 1 日以内に返信
@hastyy がすでに取り組んでいます。
2026年10月9日 から。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- node.js, typescript
- 領域
- api
調査の方向性
Start in src/v3/envvars.ts at update() and compare the non-task-context argument resolution with the working del, retrieve, and create methods. Check for an existing regression test for calling update() outside a task context; done means that call no longer throws and the env var update succeeds.
索引モデルが issue の本文から書いたものです。
説明
Env Info
System:
OS: macOS 26.5.2
CPU: (15) arm64 Apple M5 Pro
Memory: 2.33 GB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.7.0 - /Users/patrick/.nvm/versions/node/v24.7.0/bin/node
npm: 11.5.1 - /Users/patrick/.nvm/versions/node/v24.7.0/bin/npm
pnpm: 11.1.1 - /opt/homebrew/bin/pnpm
Description
Calling envvars.update(projectRef, slug, name, params) from outside a task run (a plain Node script / CI deploy step) always throws ReferenceError: name is not defined. envvars.create, del, retrieve, and list all work fine from the same context.
SDK version
@trigger.dev/sdk 4.5.0. The code path looks unchanged in the published dist, so 4.5.x is likely affected too — please confirm on the latest.
Reproduction
import { envvars } from "@trigger.dev/sdk";
// TRIGGER_ACCESS_TOKEN set in env; NOT running inside a task
await envvars.update("proj_xxx", "staging", "MY_VAR", { value: "hello" });
ReferenceError: name is not defined
at Module.update (@trigger.dev/sdk/src/v3/envvars.ts:343:5)
Root cause
update(projectRefOrName, slugOrParams, nameOrRequestOptions, params, requestOptions) — the non-task-context branch resolves the name as:
$name = name; // ❌ there is no `name` parameter here; the positional param is `nameOrRequestOptions`
Unlike del/retrieve (whose third positional parameter is literally named name), update's third parameter is nameOrRequestOptions, so name is not in scope and the call throws. The in-task-context branch is correct.
For reference, the compiled dist/commonjs/v3/envvars.js update() non-task branch:
$projectRef = projectRefOrName;
$slug = slugOrParams;
$name = name; // <- undefined reference
$params = params;
Suggested fix
$name = nameOrRequestOptions;
(matching how $projectRef / $slug / $params are resolved from the positional args in the same branch).
Impact / workaround
envvars.update() is unusable from the management-API path (e.g. updating an env var from a deploy script). Workaround: envvars.del() followed by envvars.create(). create, del, retrieve, and list are unaffected.
- 主要言語
- TypeScript
- スター
- 16.5k
- フォーク
- 1.5k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 17
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
triggerdotdev/trigger.dev のほかの issue
-
bug: retry.fetch ignores the caller's abort signal and retries aborted requests再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
triggerdotdev/trigger.dev#5116 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: Chat transport crashes on Safari < 17.4: AbortSignal.any is not a function再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
triggerdotdev/trigger.dev#5098 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: Side menu items lose their active state on detail pages再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
triggerdotdev/trigger.dev#5088 ·
メンテナーはふだん 1 日以内に返信
-
bug: RBAC loader logs "plugin found but failed to load" when @triggerdotdev/plugins is simply not installed再び着手できるかも @itsfaryal が 17 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
triggerdotdev/trigger.dev#5083 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
triggerdotdev/trigger.dev#5072 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
triggerdotdev/trigger.dev の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug platform-android
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Termix-SSH/Mobile#146 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
devswha/herdr-web-ui#3875 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信