Skip to content

docs: fix Using next-base example missing GitHub Packages npm auth - #2

Merged
miguelcolmenares merged 1 commit into
mainfrom
docs/next-base-npm-github-packages-secret
Sep 11, 2026
Merged

docs: fix Using next-base example missing GitHub Packages npm auth#2
miguelcolmenares merged 1 commit into
mainfrom
docs/next-base-npm-github-packages-secret

Conversation

@miguelcolmenares

Copy link
Copy Markdown
Member

Summary

  • The "Using next-base" reference example ran a bare npm ci in the builder stage with no .npmrc in the build context
  • Any site installing @silverassist/* packages (e.g. nextjs-core) that followed the example verbatim would 401 against GitHub Packages the first time it built outside a developer's own shell
  • Confirmed this exact bug in both senioradvice-nextjs and nextjs-boilerplate, fixed there with a BuildKit secret mount instead of ARG/ENV
  • Updates the example to match, and adds a section explaining why ARG/ENV is unsafe for this token

Test plan

  • Docs-only change, no image content affected
  • Verified the corrected pattern with a real local docker build --secret id=npm_github_token,env=NPM_GITHUB_TOKEN against senioradvice-nextjs and nextjs-boilerplate's own Dockerfiles, both now building successfully

The reference builder-stage example ran a bare npm ci with no .npmrc
in the build context — any site installing @silverassist/* packages
that followed it verbatim would 401 in CI, exactly the bug it caused
in senioradvice-nextjs and nextjs-boilerplate. Add the .npmrc copy and
a BuildKit secret mount, plus a section documenting why ARG/ENV is the
wrong place for this token.
Copilot AI lite review requested due to automatic review settings September 11, 2026 19:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@miguelcolmenares
miguelcolmenares merged commit 705efd7 into main Sep 11, 2026
7 checks passed
@miguelcolmenares
miguelcolmenares deleted the docs/next-base-npm-github-packages-secret branch September 11, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants