[BUG] EINVALIDPACKAGENAME on npm update -g
Open
Nobody has claimed this yet.
Bug
platform:windows
Priority 2
Release 7.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Current Behavior:
Running
npm update -g
without specifying any package - i.e. update all global packages, throws this error:
npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name ".bin": name cannot start with a period
Specifying package(s) will update these packages with no problems.
Expected Behavior:
npm updates all global packages normally.
Steps To Reproduce:
run npm update -g in a terminal (either command prompt or powershell)
Environment:
- OS: Windows 10 19042.844
- Node: v14.16.0
- NPM: v7.6.1
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
Reproduce npm update -g on the reported Windows, Node, and npm versions, then trace the npm CLI entry point for global updates. Done means updating all global packages without treating .bin as an invalid package name; verify the behavior with the reported command and a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100