Skip to content

[BUG] OIDC publish failing from GitHub actions #8730

Closed

Description

@nex3

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

My publishing workflow for a nested package is failing with the following error:

npm error code E404
npm error 404 Not Found - PUT https://registry.npmjs.org/@sass%2ftypes - Not found
npm error 404
npm error 404  The requested resource '@sass/[email protected]' could not be found or you do not have permission to access it.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.

You can see the wokflow here. It's invoked from ci.yml here.

I've verified that it's not the following gotchas:

  • The workflow is upgrading to the latest npm (line 119).

  • The workflow has the id-token: write permissions (line 40 of ci.yml).

  • The trusted publisher settings are pointing to the correct repo and the filename of the parent workflow:

    Image

Expected Behavior

I would expect npm publish to succeed and publish the package using OIDC.

Steps To Reproduce

Rerunning the GitHub Actions workflow reproduces this consistently

Environment

  • npm: Whatever npm@latest was at time of posting
  • Node.js: 24.11.0
  • OS Name: Ubuntu Linux
  • System Model Name: GitHub actions runner
  • npm config: GitHub actions default

Activity

  1. added
    Bugthing that needs fixing
    Needs Triageneeds review for next steps
    on Nov 11, 2025
  2. changed the title [-][BUG] OIDC[/-] [+][BUG] OIDC publish failing from GitHub actions[/+] on Nov 11, 2025
  3. dirkwa commented on Nov 12, 2025

    @dirkwa

    I have the same. Following.

  4. iatrophobic commented on Nov 16, 2025

    @iatrophobic

    same issue here had to revert to tokens

  5. Jason3S commented on Nov 16, 2025

    @Jason3S

    @nex3,

    There are a few things that I added to the workflow, to get it to work. I'm not sure which one is important in your case:

    • package.json added: "provenance": true
      "publishConfig": {
        "access": "public",
        "provenance": true
      },
    • To the workflow: env: NPM_CONFIG_PROVENANCE: true
          - run: npm publish
            env:
              NPM_CONFIG_PROVENANCE: true

    Here is a link to a successful run: https://github.com/streetsidesoftware/jest-mock-vscode/actions/runs/19406225809/job/55521264235

    In this case I used Node 24.x and NPM version 11.6.2. Node 22.x did not work for me.

    I'm not sure if this will help.

  6. nex3 commented on Nov 18, 2025

    @nex3
    Author

    Thanks for the tip, @Jason3S. Passing --provenance to npm publish and setting "repo" to the repository that I was publishing from allowed me to deploy successfully.

    Perhaps this should be added to the documentation?

  7. dragonman225 commented on Nov 24, 2025

    @dragonman225

    Using Node version 24 (instead of version 20 specified in the examples) and passing --provenance to npm publish work for me.

    Btw, I noticed that --provenance is required only when publishing from a repository for the first time. After that, it can be removed.

  8. 173 remaining items

  9. added a commit that references this issue on Aug 21, 2026
  10. added a commit that references this issue on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions