JS-DevTools / npm-publish

GitHub Action to publish to NPM
https://jstools.dev/npm-publish
MIT License
620 stars 74 forks source link

Unable to publish package #182

Closed LoeiFy closed 8 months ago

LoeiFy commented 8 months ago

getting 404 error

Error: NpmCallError: Call to "npm publish" exited with non-zero exit code 1
npm notice Publishing to https://registry.npmjs.org/ with tag latest and public access
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@variousjs%2fregistry - Not found
npm ERR! 404 
npm ERR! 404  '@variousjs/registry@0.1.0' is not in this registry.

logs

https://github.com/variousjs/registry/actions/runs/8234758851/job/22517443228

configs

name: npm publish

on:
  push:
    branches:
      - master

jobs:
  pub:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v3
        with:
          node-version: '20'

      - run: npm install
      - run: npm run build

      - uses: JS-DevTools/npm-publish@v3
        with:
          token: ${{ secrets.NPM_TOKEN }}
Screen Shot 2024-03-11 at 10 46 42 PM Screen Shot 2024-03-11 at 10 46 59 PM
mcous commented 8 months ago

Packages and scopes

This token has no access to packages and scopes

Looks like a token issue. You need to create a token with write access to packages to be able to publish packages, e.g.

Screenshot 2024-03-11 at 10 46 59