cli
cli copied to clipboard
Unable to publish to GitHub Package Registry
Is there an existing issue for this?
- [X] I have searched the existing issues
This issue exists in the latest npm version
- [X] I am using the latest npm
Current Behavior
yaml file
on: release: types: [created]
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 - uses: pnpm/action-setup@v2 with: version: 8 - run: bun i - run: pnpm nx build test-library
publish-gpr: needs: build runs-on: ubuntu-latest permissions: packages: write contents: read steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 - uses: pnpm/action-setup@v2 with: version: 8 - uses: actions/setup-node@v3 with: node-version: 20 registry-url: https://npm.pkg.github.com/ - run: bun i - run: pnpm nx build test-library - run: npm publish dist/packages/test-library --registry=https://npm.pkg.github.com/ env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} .npmrc
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} @esrathkkm:registry=https://npm.pkg.github.com/
but when i do npm publish in local termial dist/packages/test-library --registry=https://npm.pkg.github.com/ , its working fine . But when i do as github actions . its throwing npm ERR! code E403 npm ERR! 403 403 Forbidden - PUT https://npm.pkg.github.com/@esrathkkm%2ftest-repo - Permission permission_denied: write_package npm ERR! 403 In most cases, you or one of your dependencies are requesting npm ERR! 403 a package version that is forbidden by your security policy, or npm ERR! 403 on a server you do not have access to.
Expected Behavior
No response
Steps To Reproduce
- In this environment...
- With this config...
- Run '...'
- See error...
Environment
- npm:
- Node.js:
- OS Name:
- System Model Name:
- npm config:
; copy and paste output from `npm config ls` here
Does that have node installed? pretty sure npm doesn’t support bun.
Bun does not natively supports npm and pnpm, since Bun is already an package nanager, compiler, bundler, code runner. It's extremely fast and portable on linux.
- You should use only one package manager, either bun or npm/pnpm.
Please use the issue template when creating a new issues. Please provide clear reproduction case so we can also reproduce the issue. With limited information it's not possible to reproduce the issue. Thanks.