medikoo / memoizee

Complete memoize/cache solution for JavaScript
ISC License
1.73k stars 61 forks source link

memoizee@0.4.16 is broken due to node requirement #135

Closed j-fulbright closed 3 months ago

j-fulbright commented 3 months ago

error memoizee@0.4.16: The engine "node" is incompatible with this module. Expected version ">=.0.12". Got "20.13.1"

vladimir-salvador commented 3 months ago

is this ok?

"node": ">=.0.12"

I tried with nodejs 21 and it blows up with the mentioned error

simlu commented 3 months ago

And I was wondering why I can't deploy to prod anymore... please fix

galaxyreal commented 3 months ago

You can add the following to your package.json file:

For yarn install:

"resolutions": {
  "memoizee": "0.4.15"
}

For npm install:

"overrides": {
  "memoizee": "0.4.15"
}
simlu commented 3 months ago

If you are facing this issue in cli with a global yarn install you use --ignore-engines like so

yarn global add serverless@3.33.0 --ignore-engines

mayaashizumi-munn commented 3 months ago

Thanks @simlu that worked 👍

drazisil commented 3 months ago

Do you happen to have a related fix commands for pnpm?

j-fulbright commented 3 months ago

Do you happen to have a related fix commands for pnpm?

Check issue 136 for some other suggestions, if youre leveraging package json and not doing a direct global install

hyunbinseo commented 3 months ago

@drazisil For pnpm, use the pnpm.overrides field.

// package.json
{
  // ...
  "pnpm": {
    "overrides": {
      "memoizee": "0.4.15"
    }
  },
}

Reference https://pnpm.io/ko/package_json#pnpmoverrides

thoroc commented 3 months ago

PR in https://github.com/medikoo/memoizee/pull/137

medikoo commented 3 months ago

Thank you for raising, and sorry for the trouble (TIL: that you can break pipelines by misconfigured engine field).

Fixed and published with v0.4.17