-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Bugthing that needs fixingthing that needs fixingDocumentationdocumentation related issuedocumentation related issuePriority 2secondary priority issuesecondary priority issueRelease 10.x
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
npm publish complains and auto correct the bin field examples from npm docs.
Expected Behavior
Seems like the examples are correct, there is no need to complain or alter the code.
Steps To Reproduce
First example:
- Create fresh repo with
npm init -y - Add dummy file
cli.js - Copy
binfield entry from npm docs topackage.json:
"bin": {
"myapp": "./cli.js"
}Second example:
- Create fresh repo with
npm init -y - Add dummy file
cli.js - Copy
binfield entry from npm docs topackage.json:
"bin": "./cli.js"Finally run npm publish --dry-run. In both cases npm complains:
npm WARN publish npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.
npm WARN publish errors corrected:
npm WARN publish "bin[myapp]" script name was cleanedEnvironment
- npm: 10.2.4
- Node.js: 20.11.1
- OS Name: macOS
- System Model Name: Macbook Pro
- npm config:
; "user" config from /Users/(replaced)/.npmrc
//registry.npmjs.org/:_authToken = (protected)
; node bin location = /Users/(replaced)/.n/bin/node
; node version = v20.11.1
; npm local prefix = /Users/(replaced)/Projects/x-npm-bin
; npm version = 10.2.4
; cwd = /Users/(replaced)/Projects/x-npm-bin
; HOME = /Users/(replaced)
; Run `npm config ls -l` to show all defaults.trivikr, mbtools, ShenHongFei and eekelof
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingDocumentationdocumentation related issuedocumentation related issuePriority 2secondary priority issuesecondary priority issueRelease 10.x