You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only related issue I could find was #4724 however that is adjacent to this.
This issue exists in the latest npm version
I am using the latest npm
Current Behavior
I maintain a GitHub action that publishes to npm, which occasionally encounters the error:
npm ERR! code E409
npm ERR! 409 Conflict - PUT https://registry.npmjs.org/get-cli-arg - Failed to save packument. A common cause is if you try to publish a new package before the previous package has been fully processed.
npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-12-29T16_27_48_507Z-debug-0.log
npm publish failed with exit status: 1
We can see that the error code is 409, however unfortunately to get this information programatically I would have to scan stderr. I believe instead of scanning stderr, npm should make the exit status the error code, in this case 409, instead of just returning exit status 1.
I understand this is more of a feature request, however there wasn't a template for that when creating this issue.
Expected Behavior
Exit status for error code 409 should be 409 instead of 1, to allow easy programatic identification (exit status are readily available via most programming languages that deal with CLI execution) whereas stderr scanning is more tedious.
Steps To Reproduce
To reproduce error 409, publish two updates to a package in quick succession, such as a preview release tag and a latest release.
Environment
npm: 10.2.3
Node.js: v20.10.0
OS Name: Ubuntu 22.04.3 LTS
System Model Name: I believe x86_64, but not relevant
npm config: not relevant
The text was updated successfully, but these errors were encountered:
I'm sorry, but those links refer to exit statuses from linux system processes and error codes from windows system function calls. There is no requirement nor stated expectation that non-system programs ought to or are expected to return the same.
Is there an existing issue for this?
The only related issue I could find was #4724 however that is adjacent to this.
This issue exists in the latest npm version
Current Behavior
I maintain a GitHub action that publishes to npm, which occasionally encounters the error:
from the following code:
https://github.com/bevry-actions/npm/blob/3d7f43852ed3893954dfe3e788c17af03c08c404/action.bash#L50-L73
We can see that the error code is 409, however unfortunately to get this information programatically I would have to scan stderr. I believe instead of scanning stderr, npm should make the exit status the error code, in this case
409
, instead of just returning exit status1
.I understand this is more of a feature request, however there wasn't a template for that when creating this issue.
Expected Behavior
Exit status for error code 409 should be 409 instead of 1, to allow easy programatic identification (exit status are readily available via most programming languages that deal with CLI execution) whereas stderr scanning is more tedious.
Steps To Reproduce
To reproduce error 409, publish two updates to a package in quick succession, such as a preview release tag and a latest release.
Environment
The text was updated successfully, but these errors were encountered: