yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

[Bug?]: misleading warning Invalid bin entry for "" (in ""). #9010

Open Et7f3 opened 7 months ago

Et7f3 commented 7 months ago

Self-service

Describe the bug

I get this error message when name field is absent. I expected a message similar to license:

warning package.json: No license field

To reproduce

package.json:

{
  "bin": "app.js",
  "dependencies": {
    "webpack": "^5.89.0"
  },
  "license": "UNLICENSED"
}

add a name and error disappear

Environment

yarn v1.22.19

Additional context

No response