René's URL Explorer Experiment


Title: bug: envvars.update() throws "ReferenceError: name is not defined" outside a task context · Issue #4264 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: bug: envvars.update() throws "ReferenceError: name is not defined" outside a task context · Issue #4264 · triggerdotdev/trigger.dev

X Title: bug: envvars.update() throws "ReferenceError: name is not defined" outside a task context · Issue #4264 · triggerdotdev/trigger.dev

Description: 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/v...

Open Graph Description: 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...

X Description: 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...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/4264

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: envvars.update() throws \"ReferenceError: name is not defined\" outside a task context","articleBody":"## Env Info\n\n```\n  System:\n    OS: macOS 26.5.2\n    CPU: (15) arm64 Apple M5 Pro\n    Memory: 2.33 GB / 48.00 GB\n    Shell: 5.9 - /bin/zsh\n  Binaries:\n    Node: 24.7.0 - /Users/patrick/.nvm/versions/node/v24.7.0/bin/node\n    npm: 11.5.1 - /Users/patrick/.nvm/versions/node/v24.7.0/bin/npm\n    pnpm: 11.1.1 - /opt/homebrew/bin/pnpm\n```\n\n## Description\n\nCalling `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.\n\n## SDK version\n\n`@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.\n\n## Reproduction\n\n```ts\nimport { envvars } from \"@trigger.dev/sdk\";\n\n// TRIGGER_ACCESS_TOKEN set in env; NOT running inside a task\nawait envvars.update(\"proj_xxx\", \"staging\", \"MY_VAR\", { value: \"hello\" });\n```\n\n```\nReferenceError: name is not defined\n    at Module.update (@trigger.dev/sdk/src/v3/envvars.ts:343:5)\n```\n\n## Root cause\n\n`update(projectRefOrName, slugOrParams, nameOrRequestOptions, params, requestOptions)` — the non-task-context branch resolves the name as:\n\n```ts\n$name = name; // ❌ there is no `name` parameter here; the positional param is `nameOrRequestOptions`\n```\n\nUnlike `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.\n\nFor reference, the compiled `dist/commonjs/v3/envvars.js` `update()` non-task branch:\n\n```js\n$projectRef = projectRefOrName;\n$slug = slugOrParams;\n$name = name;      // \u003c- undefined reference\n$params = params;\n```\n\n## Suggested fix\n\n```ts\n$name = nameOrRequestOptions;\n```\n\n(matching how `$projectRef` / `$slug` / `$params` are resolved from the positional args in the same branch).\n\n## Impact / workaround\n\n`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.\n","author":{"url":"https://github.com/patrick-fintary","@type":"Person","name":"patrick-fintary"},"datePublished":"2026-07-15T04:46:50Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/4264"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:cd490871-d48e-d589-b48b-980ac167a70a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBDD6:1E77:A25AA1:EED9F2:6AFB0714
html-safe-nonceb9ae0f725d9a503a6a391bb16afc78a17a97262caab1cb906d7bd0408c96ec64
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREQ2OjFFNzc6QTI1QUExOkVFRDlGMjo2QUZCMDcxNCIsInZpc2l0b3JfaWQiOiIyNzE0MTA5NTQ1NDY1NzEwMzU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac2be59b6bbbce8662ff813d4c917c5eb3252ea968a82103ea4936440f4a40abed
hovercard-subject-tagissue:4889364923
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/4264/issue_layout
twitter:imagehttps://opengraph.githubassets.com/181fb8ef8956414cde311396aeec69adcadecc05e641b2d3a0b5a204c3f92f21/triggerdotdev/trigger.dev/issues/4264
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/181fb8ef8956414cde311396aeec69adcadecc05e641b2d3a0b5a204c3f92f21/triggerdotdev/trigger.dev/issues/4264
og:image:altEnv 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...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepatrick-fintary
hostnamegithub.com
expected-hostnamegithub.com
None76fb13cb43f1834708971f45a9cfcab5df3177a7582086613d7cdc6e98c4bfde
turbo-cache-controlno-preview
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseafc998826cdd963c8f91a96ae5372809ab5e296b
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/issues/4264#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F4264
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F4264
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/4264
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/4264
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/4264
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
https://github.com/triggerdotdev/trigger.dev
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/4264
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/4264
bug: envvars.update() throws "ReferenceError: name is not defined" outside a task contexthttps://github.com/triggerdotdev/trigger.dev/issues/4264#top
https://github.com/hastyy
https://github.com/patrick-fintary
patrick-fintaryhttps://github.com/patrick-fintary
on Jul 15, 2026https://github.com/triggerdotdev/trigger.dev/issues/4264#issue-4889364923
patrick-fintaryhttps://github.com/patrick-fintary
on Jul 15, 2026https://github.com/triggerdotdev/trigger.dev/issues/4264#event-27997886065
https://github.com/itzzdev09
itzzdev09https://github.com/itzzdev09
on Aug 28, 2026https://github.com/triggerdotdev/trigger.dev/issues/4264#issuecomment-5455761732
https://github.com/claxman
claxmanhttps://github.com/claxman
on Sep 7, 2026https://github.com/triggerdotdev/trigger.dev/issues/4264#issuecomment-5566344762
0a23814https://github.com/triggerdotdev/trigger.dev/commit/0a23814a0896205da227520bd417bd490a017379
hastyyhttps://github.com/hastyy
on Oct 9, 2026https://github.com/triggerdotdev/trigger.dev/issues/4264#event-32888282733
Sign up for freehttps://github.com/signup?return_to=https://github.com/triggerdotdev/trigger.dev/issues/4264
Sign in to commenthttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/4264
hastyyhttps://github.com/hastyy
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.