fastify-secure-session icon indicating copy to clipboard operation
fastify-secure-session copied to clipboard

`.bin` is not registered when using yarn

Open climba03003 opened this issue 3 years ago • 5 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have searched existing issues to ensure the regression has not already been reported

Last working version

4.1.0

Stopped working in version

4.1.1

Node.js version

18.x

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

20.04

💥 Regression Report

yarn do not put the bin file inside .bin folder. So, it is unavailable to use either yarn or npx to execute genkey.js when you use yarn as package manager.

I don't know if it is expected behavior for yarn. Some related information is that yarn only consider /^(?!\.{0,2}$)[a-z0-9._-]+$/i as valid bin.

Steps to Reproduce

npm init
yarn add @fastify/secure-session
yarn @fastify/secure-session // fail
npx @fastify/secure-session // fail

Expected Behavior

No response

climba03003 avatar May 18 '22 05:05 climba03003

It seems an old yarn known issue: https://github.com/yarnpkg/yarn/issues/5353#issuecomment-399381322

Eomm avatar May 31 '22 14:05 Eomm

Created a PR. We could fix this with npx if we create a package, e.g. called fastify-secure-sesion-generate-key

Uzlopak avatar Jul 31 '22 16:07 Uzlopak

Just as a remark: In the issue is written that npx @fastify/secure-session fails, but it is actually working with npx

Uzlopak avatar Aug 01 '22 15:08 Uzlopak

I updated the description a bit. The prerequisite is using yarn as package manager. Once you use it, it will also fail the npx command.

climba03003 avatar Aug 01 '22 15:08 climba03003

Thanks for the clarification

Uzlopak avatar Aug 01 '22 16:08 Uzlopak