common icon indicating copy to clipboard operation
common copied to clipboard

package.json bin has a wrong entry for gherkin-utils

Open robvdnieuw opened this issue 2 years ago • 1 comments

👓 What did you see?

When installing the Gherkin-utils package with Yarn 3.1.1 we get the following error:

1> Ô×ñ YN0001 : Ôöé error : Invalid filename: "@cucumber/gherkin-utils" 1> at kr (.yarn\releases\yarn-berry.cjs:312:6878) 1> at o (.yarn\releases\yarn-berry.cjs:695:5923) 1> at o (.yarn\releases\yarn-berry.cjs:695:6083) 1> at o (.yarn\releases\yarn-berry.cjs:695:6083) 1> at o (.yarn\releases\yarn-berry.cjs:695:6083) 1> at H6e (.yarn\releases\yarn-berry.cjs:695:6164) 1> at async T6e (.yarn\releases\yarn-berry.cjs:695:10478) 1> at async yce.finalizeInstall (.yarn\releases\yarn-berry.cjs:680:26254) 1> at async Ke.linkEverything (.yarn\releases\yarn-berry.cjs:441:14966) 1> at async .yarn\releases\yarn-berry.cjs:444:4329

We found other reports of these kind of issues for example: #https://github.com/ngneat/until-destroy/issues/108

So we tried and tested:

changing in the package.json

"bin": {
    "@cucumber/gherkin-utils": "bin/gherkin-utils"
  },

into

"bin": "bin/gherkin-utils",

solves the issue.

robvdnieuw avatar Aug 04 '22 13:08 robvdnieuw

I apologize if this question is too basic... but which package.json do you mean? Something that needs to be fixed in cucumber? Or in each person's project?

I am having this error in my project but I don't have anything about bin in my package.json. I tried just adding "bin": "bin/gherkin-utils", just in case, but the error is not solved.

I would happily keep using yarn1, but when you run yarn install with a new version of yarn it insists in auto updating the project.

lilicaway avatar Sep 30 '22 07:09 lilicaway