Skip to content

Fix publish-npm: add scope to setup-node, add publishConfig to package.json#94

Closed
QilongTang with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-publish-npm-job
Closed

Fix publish-npm: add scope to setup-node, add publishConfig to package.json#94
QilongTang with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-publish-npm-job

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The publish-npm CI job was failing with npm error 404 Not Found - PUT https://registry.npmjs.org/@dynamods%2fdynamo-home. The npm registry returns 404 (not 401/403) when a scoped package publish is attempted without valid scope-bound authentication.

Changes

.github/workflows/npm-publish.yml

  • Added scope: '@dynamods' to the setup-node step in publish-npm. Without this, setup-node does not generate the scope-prefixed .npmrc entry needed to correctly bind NODE_AUTH_TOKEN to the @dynamods registry scope:
    - uses: actions/setup-node@...
      with:
        node-version: 22
        registry-url: https://registry.npmjs.org/
        scope: '@dynamods'   # required for scoped package auth

package.json

  • Added publishConfig.access: "public" — the canonical way to declare a scoped package as publicly publishable, rather than relying solely on the --access public CLI flag.
  • Fixed "main": "index.tsx""main": "build/index.bundle.js" — the previous value referenced a TypeScript source file absent from the published dist/ tarball, triggering npm v10 validation warnings.

Prerequisite: The npm_token repository secret must be set to a valid npm token with write access to the @dynamods org. These workflow/config fixes are necessary but not sufficient without a valid token in place.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job publish-npm Fix publish-npm: add scope to setup-node, add publishConfig to package.json Jun 16, 2026
Copilot AI requested a review from QilongTang June 16, 2026 23:13
@dynamo-ci-user

Copy link
Copy Markdown

LCOV of commit fb5ce34 during Build #440

Summary coverage rate:
  lines......: 81.5% (516 of 633 lines)
  functions..: 77.9% (116 of 149 functions)
  branches...: no data found

Files changed coverage rate: n/a

@QilongTang QilongTang closed this Jun 17, 2026
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.

3 participants