docs: fix Using next-base example missing GitHub Packages npm auth - #2
Merged
Merged
Conversation
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.
miguelcolmenares
deleted the
docs/next-base-npm-github-packages-secret
branch
September 11, 2026 20:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm ciin the builder stage with no.npmrcin the build context@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 shellsenioradvice-nextjsandnextjs-boilerplate, fixed there with a BuildKit secret mount instead of ARG/ENVTest plan
docker build --secret id=npm_github_token,env=NPM_GITHUB_TOKENagainstsenioradvice-nextjsandnextjs-boilerplate's own Dockerfiles, both now building successfully