[BUG] when publishing a scoped module to an org that doesn't exist, npm is a bit too helpful
Open
Nobody has claimed this yet.
Bug
Needs Triage
Release 8.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
- I want to publish
@myspace/bnb - I verify that
@myspaceis not taken as a scope - I create my package and run
npm publish --access public - npm "helpfully" tells me that
@myspace/bnbis not published and that I should ask the maintainer to publish it or do so myself- that is what I'm trying to do?
Expected Behavior
- I want to publish
@myspace/bnb - I verify that
@myspaceis not taken as a scope - I create my package and run
npm publish --access public - npm tells me that
@myspace/bnbcannot be published by me because the organization does not exist and that I should go create the organization before trying to publish it
Steps To Reproduce
- create package under a scope of an org that doesn't exist
- try to publish
- get told that the publish failed and that you should try to publish
Environment
- npm: 8.5.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by reproducing npm publish for a scoped package whose organization does not exist, using npm 8.5.3 or the current CLI, then trace the publish error-handling entry point. Done means the command clearly says the organization does not exist and advises creating it before retrying.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100