setup-node: Use GitHub Actions to publish npm package error: login required
https://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.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 15 (6 by maintainers)
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.