Commit 08c6271
authored
fix: sanitize deprecated npm_config env vars before deploy commands (#201)
## Problem
npm 10+ (shipped with Node 20.17+, Node 22+, Node 24) emits deprecation
warnings to stderr for legacy `npm_config_*` environment variables
inherited from the GitHub Actions runner environment:
```
npm warn config This environment variable is no longer supported: npm_config_version_tag_prefix
npm warn config This environment variable is no longer supported: npm_config_version_git_message
npm warn config This environment variable is no longer supported: npm_config_version_commit_hooks
```
Jarvis treats **any stderr output** as a deployment failure, causing
deploys to fail for repos that have upgraded to Node 24 (e.g. `results`
via #2436).
## Root Cause
These env vars are set by the runner environment (not by our workflows
or `.npmrc`). They are remnants of npm v6-era config that npm 10+ no
longer recognizes.
## Fix
Unset the deprecated keys before running deploy commands in both:
- `frontend-deploy-workflow.yml` (production deploy)
- `frontend-pr-workflow.yml` (preview deploy)
The `unset` is a no-op on older Node versions where these vars don't
exist, so this is safe for all repos regardless of Node version.1 parent 68dbb1f commit 08c6271
2 files changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
608 | 618 | | |
609 | 619 | | |
610 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
524 | 533 | | |
525 | 534 | | |
526 | 535 | | |
| |||
0 commit comments