Skip to content

[BUG] bin was converted to an object warnings when using string as bin. #83

@byCedric

Description

@byCedric

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

In the package.json's bin documentation, it's documented that you can use an object with one or more bin file references OR use a single string.

image

Unfortunately, this is now marked as "error in your package.json when publishing".

image

Expected Behavior

I expected this notation to not be marked as an error, as the documentation clearly documents this as a valid option.

Steps To Reproduce

  • $ npm init
  • Add a bin file
  • Configure "bin": "path/to/file.js"
  • $ npm publish

image

Environment

  • npm: 10.2.4
  • Node: 20.10.0
  • OS: MacOS Sonoma 14.2.1
  • platform: Macbook Pro (14", 2023)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions