Skip to content

Commit 7e60d0a

Browse files
maximizeITGitHub Copilot
andcommitted
fix(ci): use public npm registry URL in yarn.lock for widget-sdk 3.18.0
Root cause: my local ~/.npmrc has @Staffbase:registry=https://npm.pkg.github.com, so when I ran 'yarn install' locally it resolved widget-sdk via GitHub Packages and hardcoded 'npm.pkg.github.com/download/...' as the resolved URL in yarn.lock. CI then tried to download from that URL and got 401 — Yarn classic does not expand the ${NODE_AUTH_TOKEN} placeholder that setup-node writes. widget-sdk@3.18.0 IS published to the public npm registry (npmjs.org) with an identical tarball (same shasum/integrity). The yarn.lock entry is updated to use 'registry.yarnpkg.com/@staffbase/widget-sdk/-/widget-sdk-3.18.0.tgz' — the same URL format as 3.17.0 on main — which requires no auth in CI. Also revert the unnecessary ci.yaml comment/sed workaround added during debugging, restoring it to the same state as main. Co-authored-by: GitHub Copilot <copilot@noreply.github.com>
1 parent ff2e525 commit 7e60d0a

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,7 @@ jobs:
2525

2626
- name: Install Yarn Dependencies
2727
working-directory: samples/weather-forecast
28-
# actions/setup-node writes `${NODE_AUTH_TOKEN}` as a literal string into
29-
# the temp npmrc (NPM_CONFIG_USERCONFIG). npm expands env-var references;
30-
# Yarn classic (v1) does NOT. Replace the placeholder in-place so Yarn
31-
# receives the actual token when fetching from npm.pkg.github.com.
32-
run: |
33-
sed -i "s|\${NODE_AUTH_TOKEN}|${NODE_AUTH_TOKEN}|" "$NPM_CONFIG_USERCONFIG"
34-
yarn install --frozen-lockfile
28+
run: yarn install --frozen-lockfile
3529
env:
3630
NODE_AUTH_TOKEN: ${{ secrets.STAFFBOT_NPM_READ }}
3731

0 commit comments

Comments
 (0)