Skip to content

Use GitHub Actions to publish npm package error: login required #342

@yisibl

Description

@yisibl

https://github.com/yisibl/resvg-js/runs/3846453308?check_suite_focus=true

CI: https://github.com/yisibl/resvg-js/blob/d2c05784fe391f6ecdb46dbc129d467a167e239c/.github/workflows/CI.yaml#L455-L500

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.

image

image

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions