npm-publish
npm-publish copied to clipboard
Action does not publish non-scoped package to NPM
EDIT: for now I'm going to continue working on the project, the repo at the time of writing is at this commit
Context
NPM package | GitHub repo | workflow file
The NPM_AUTH_TOKEN
repo secret is a "publish" token, and I have temporarily disabled 2FA to try to get this working. (this same error also appears when using an "automation" token, and as expected a "read only" token will also refuse to publish).
You might notice the actions tab has a dozen workflow runs; this problem has persisted for the last 12 hours and recently switching to this action from npm publish
has done absolutely nothing to change it.
The part that matters
My package just-checkit
is currently on npm at version 0.1.0, published from my local machine.
When trying to publish 0.1.2, which is not (and never has been) on npm. via a github workflow I get the error output below.
I'm convinced this is an authorisation error, as making a PUT
request to my package on the registry with valid authentication and without any request body doesn't reject with 404 NOT FOUND
;
i.e. if this request was authorised it would have a different error message.
Output;
// tarball info, everything exactly as it should be
npm notice Publishing to https://registry.npmjs.org/
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/just-checkit - Not found
npm ERR! 404
npm ERR! 404 '[email protected]' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2022-05-29T11_52_06_400Z-debug-0.log
Error: Error: Unable to publish just-checkit v0.1.2 to NPM.
npm publish --access public exited with a status of 1.
at Object.publish (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/src/npm.ts:112:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
ProcessError: npm publish --access public exited with a status of 1.
at normalizeResult (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/node_modules/@jsdevtools/ez-spawn/lib/normalize-result.js:31:1)
at ChildProcess.<anonymous> (/home/runner/work/_actions/JS-DevTools/npm-publish/v1/node_modules/@jsdevtools/ez-spawn/lib/async.js:79:1)
at ChildProcess.emit (events.js:314:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
Like I said this has been the exact same error for a while, and the sum of all the google searches I've made is roughly "lol good luck".
Did I Google it?
Yes, many, many times.
It seems that no one has had this issue before, or at least the cause of it for them is different from the cause here, none of the recommended solutions work.
I've been dragged all across github issues, stack overflow, npm docs, github community, and I'm honestly quite concerned that nothing I've found has worked.
The only time the error message changed was when I introduced a new error before this one by implementing a "solution".