-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 🐛 "require('fs').writeFileSync()" causes npm publish
failure with vague E403 error
#6137
Comments
npm publish
failure with vague E403 error
npm publish
failure with vague E403 errornpm publish
failure with vague E403 error
…6137) # [why] Using the text "require('fs').writeFileSync(...)" blocks `npm publish` from completing successfully; it faults with a horribly vague `npm ERR! code E403 ...` error. Minor modification of the text will bypass the fault. Issue raised at [GH:npm/cli#6137](npm/cli#6137).
…6137) # [why] Using the text "require('fs').writeFileSync(...)" blocks `npm publish` from completing successfully; it faults with a horribly vague `npm ERR! code E403 ...` error. Minor modification of the text will bypass the fault. Issue raised at [GH:npm/cli#6137](npm/cli#6137).
…6137) ## [why] Using the text "require('fs').writeFileSync(...)" blocks `npm publish` from completing successfully; it faults with a horribly vague `npm ERR! code E403 ...` error. Minor modification of the text will bypass the fault. Issue raised at [GH:npm/cli#6137](npm/cli#6137).
…6137) ## [why] Using the text "require('fs').writeFileSync(...)" blocks `npm publish` from completing successfully; it faults with a horribly vague `npm ERR! code E403 ...` error. Minor modification of the text will bypass the fault. Issue raised at [GH:npm/cli#6137](npm/cli#6137).
…6137) ## [why] Using the text "require('fs').writeFileSync(...)" blocks `npm publish` from completing successfully; it faults with a horribly vague `npm ERR! code E403 ...` error. Minor modification of the text will bypass the fault. Issue raised at [GH:npm/cli#6137](npm/cli#6137).
Sounds like it's failing validation by the registry itself. Closing: this looks to be an issue with the registry which is outside the scope of this repo. For registry support please go to npmjs.com/support. If you believe this is a bug with the cli, please provide further clarifying details. |
@fritzy , I've found, simplified, presented, and, finally, worked around the problem. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
OS name: WinOS
OS version: Microsoft Windows [Version 10.0.19044.2486]
node v18.6.0
npm v9.3.0
I ran into an ugly bug when trying to publish some packages over the weekend. With a horribly vague error message, it was quite a task to determine the actual problem. After much churn, here's the simple reproducible case I was able to generate:
npm publish
fails with this vaguely horrifying message:Expected Behavior
npm publish
succeeds.Steps To Reproduce
npm init
npm publish
will succeed (ie, https://www.npmjs.com/package/@rivy-labs/-x-8ff8f63d-6ef9-44ee-999b-fc9edf489c98-basic)npm publish
fails withE403...
Environment
The text was updated successfully, but these errors were encountered: