lukemorales / query-key-factory

A library for creating typesafe standardized query keys, useful for cache management in @tanstack/query

Home Page:https://www.npmjs.com/package/@lukemorales/query-key-factory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't install the package with npm

Shaglock opened this issue · comments

Following the install guide from the README, I can not install the package. Here is the logs

❯ npm install @lukemorales/query-key-factory
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: @lukemorales/query-key-factory@0.2.0
npm ERR! notsup Not compatible with your version of node/npm: @lukemorales/query-key-factory@0.2.0
npm ERR! notsup Required: {"node":"^14 || ^16","npm":"please-use-yarn","yarn":"^1"}
npm ERR! notsup Actual:   {"npm":"8.1.0","node":"v16.13.0"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myuser/.npm/_logs/2022-08-29T07_35_29_130Z-debug.log

I think its because of please-use-yarn package, but why is there such restriction?
If you plan to keep this restriction, I think readme has to be updated to use yarn as example and also maybe message about this restriction, or at least some more meaningful error message would be good for the end users. I see that original please-use-yarn package is very very simple and provides only message in Chinese, so maybe there is another way to enforce such restriction (fork that or just use something else)?

@Shaglock Thanks for bringing this to my attention. Sorry about the inconvenience, it was totally a misunderstanding that the yarn restriction would only affect development. I just published v0.2.1 without that engine restriction