Use GitHub Actions to publish npm package error: login required
See original GitHub issuehttps://github.com/yisibl/resvg-js/runs/3846453308?check_suite_focus=true
npm config list
; "user" config from /home/runner/work/_temp/.npmrc
//registry.npmjs.org/:_authToken = (protected)
always-auth = false
registry = "https://registry.npmjs.org/"
; "env" config from environment
userconfig = "/home/runner/work/_temp/.npmrc"
; node bin location = /opt/hostedtoolcache/node/16.11.0/x64/bin/node
; cwd = /home/runner/work/resvg-js/resvg-js
; HOME = /home/runner
; Run `npm config ls -l` to show all defaults.
2021-10-09T12:13:05.765Z napi:spawn execute npm publish
npm notice
npm notice 📦 @resvg/resvg-js-win32-x64-msvc@1.0.0
npm notice === Tarball Contents ===
npm notice 104B README.md
npm notice 629B package.json
npm notice 2.4MB resvgjs.win32-x64-msvc.node
npm notice === Tarball Details ===
npm notice name: @resvg/resvg-js-win32-x64-msvc
npm notice version: 1.0.0
npm notice filename: @resvg/resvg-js-win32-x64-msvc-1.0.0.tgz
npm notice package size: 1.1 MB
npm notice unpacked size: 2.4 MB
npm notice shasum: b48d84d0d5b2f26eda9b8b44c443b91e5245f731
npm notice integrity: sha512-Psq8QC9BQ9WrJ[...]RtniRK8CHon3w==
npm notice total files: 3
npm notice
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-09T12_13_06_482Z-debug.log
Internal Error: Execution failed with a non-error rejection (rejected value: undefined)
at Cli2.error (/home/runner/work/resvg-js/resvg-js/node_modules/@napi-rs/cli/scripts/index.js:2173:19)
at Cli2.run (/home/runner/work/resvg-js/resvg-js/node_modules/@napi-rs/cli/scripts/index.js:1994:37)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! code 1
npm ERR! path /home/runner/work/resvg-js/resvg-js
npm ERR! command failed
npm ERR! command sh -c napi prepublish -t npm
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-09T12_13_06_536Z-debug.log
Error: Process completed with exit code 1.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Working with the npm registry - GitHub Docs
To authenticate by logging in to npm, use the npm login command, replacing USERNAME with your GitHub username, TOKEN with your personal access...
Read more >publishing to npm fails after publishing to GPR #52 - GitHub
Using the CLI I can publish to GPR no problem, but the authentication fails with Actions -- even though the process is nearly...
Read more >Unable to publish Github package #269
I am trying to setup a workflow that publishes a Github package, but I can't seem to make it work. Here is a...
Read more >Unable to publish to the GitHub Registry · Issue #130 · actions ...
The problem I'm having is that every time I publish it says I must authenticate, except it's providing a URL related to the...
Read more >Publishing Node.js packages - GitHub Docs
json file should be @octocat/hello-world . If your npm package uses a scope prefix and the package is public, you need to use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Environments and secrets are very confusing, which caused me to add the npm token to Environments, so it would fail. I suggest GitHub give better documentation and UX on how to add npm tokens here.
I had the same problem, thank you very much for the issues