jest icon indicating copy to clipboard operation
jest copied to clipboard

[Bug]: npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it.

Open anomiex opened this issue 1 year ago • 33 comments
trafficstars

Version

30.0.0-alpha.5

Steps to reproduce

Starting with an empty project, do the following:

  1. npm install jest@next

Expected behavior

No deprecation warnings.

Actual behavior

npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported

Additional context

The dependencies come in via babel-plugin-istanbul. See istanbuljs/babel-plugin-istanbul#294 and istanbuljs/babel-plugin-istanbul#295.

Note this is not the same as the direct dependencies fixed by #14509.

Environment

System:
    OS: Linux 6.9 Debian GNU/Linux trixie/sid
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  Binaries:
    Node: 20.16.0 - /usr/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.8.1 - /usr/bin/npm
    pnpm: 9.6.0 - /usr/local/bin/pnpm
  npmPackages:
    jest: ^30.0.0-alpha.5 => 30.0.0-alpha.5

anomiex avatar Aug 03 '24 14:08 anomiex

Same warning on my dependency tree:

├─┬ [email protected]
│ └─┬ @jest/[email protected]
│   ├─┬ @jest/[email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected]
│   └─┬ [email protected]
│     └── [email protected]
├─┬ [email protected]
│ └─┬ @jest/[email protected]
│   └─┬ [email protected]
│     └─┬ [email protected]
│       └── [email protected]

Should switch to [email protected]

xavierraffin avatar Aug 07 '24 18:08 xavierraffin

Duplicate of https://github.com/jestjs/jest/issues/15173 ? (maybe not exactly)

xavierraffin avatar Aug 07 '24 18:08 xavierraffin

Not necessarily. #15173 is reporting the warnings in 29.7.0, which were partially fixed by #14509. Same for #15087. This issue is specifically about what remains in 30.0.0-alpha.5 after #14509.

anomiex avatar Aug 07 '24 18:08 anomiex

Unfortunately test-exclude has dropped Node 16, so we cannot upgrade in the babel plugin. Might be able to drop the dep, tho?

SimenB avatar Aug 07 '24 21:08 SimenB

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Sep 06 '24 22:09 github-actions[bot]

Issue still exists in jest@next, stale-bot.

anomiex avatar Sep 08 '24 13:09 anomiex

+1

avifenesh avatar Sep 13 '24 20:09 avifenesh

Quote reply

For inflight not sure for globe (v9 is available and installed manually)

image for glob 9 glob v9

ghost avatar Sep 23 '24 06:09 ghost

+1

soderlundf avatar Sep 29 '24 06:09 soderlundf

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Nov 15 '24 22:11 github-actions[bot]

Issue still exists in jest@next, stale-bot.

anomiex avatar Nov 17 '24 16:11 anomiex

Same issue here, is anyone working on this?

dushmanta05 avatar Nov 20 '24 05:11 dushmanta05

Are there any workaround or alternatives for this?

mhanxchu avatar Nov 28 '24 11:11 mhanxchu

As a workaround for this specific issue in jest@next, you could use package manager overrides to use test-exclude v7 in place of the test-exclude v6 that babel-plugin-istanbul depends on. At a quick glance, I see no functional differences between 6.0.0 and 7.0.0, just the updated dependencies (which all still appear to support node 16, FWIW, despite https://github.com/istanbuljs/test-exclude/commit/ad7dfe1beb553678725faeca158f9ae605b3f561 suggesting that deps were the reason for test-exclude requiring node >=18 rather than >=16, which is what is blocking jest and babel-plugin-istanbul from updating to that version officially).

Let's keep this issue focused on jest@next. If you're still using jest 29.7.0, please use https://github.com/jestjs/jest/issues/15173 to discuss any additional workarounds needed for that version. 🙂

anomiex avatar Nov 30 '24 16:11 anomiex

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Dec 30 '24 17:12 github-actions[bot]

Still waiting

avifenesh avatar Dec 30 '24 17:12 avifenesh

Issue still exists in jest@next, stale-bot.

anomiex avatar Jan 05 '25 14:01 anomiex

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Feb 04 '25 15:02 github-actions[bot]

Issue still exists in jest@next, stale-bot.

anomiex avatar Feb 05 '25 12:02 anomiex

will it be fixed or something? it has duplicates, I did reference my issue (same) here: https://github.com/jestjs/jest/issues/15503#issuecomment-2661667208

Luxcium avatar Feb 16 '25 23:02 Luxcium

As a current workaround, override the glob (which installs inflight) version in your ´package.json´:

  "overrides": {
    "glob": "^11.0.1"
  }

The error will be gone and you can check it with npm ls inflight

advename avatar Feb 21 '25 14:02 advename

Rather than blindly overriding glob for everything, which may break other packages (e.g. things using glob v9's default exports, or any of the many things from v8 that were changed in v9), the workaround from https://github.com/jestjs/jest/issues/15236#issuecomment-2509023010 would be more targeted at the dependency chain involved here.

If you want something copy-pasteable, here are snippets for npm

        "overrides": {
            "babel-plugin-istanbul": {
                "test-exclude": "^7"
            }
        }

and pnpm

        "pnpm": {
            "overrides": {
                "babel-plugin-istanbul>test-exclude": "^7"
            }
        }

Note neither of those address the stuff from jest 29.7.0 that has been fixed in jest@next; please discuss additional workarounds for jest 29.7.0 in https://github.com/jestjs/jest/issues/15173 to keep this one specific to jest@next.

anomiex avatar Feb 23 '25 18:02 anomiex

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Mar 25 '25 19:03 github-actions[bot]

Issue still exists in jest@next, stale-bot.

anomiex avatar Mar 26 '25 13:03 anomiex

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Apr 25 '25 15:04 github-actions[bot]

Perhaps jest was never serious, just in jest. The project does not seem to have much activity or good governance, when issues like these remain stale and nobody does anything. I know, it's volunteers and I can't very well demand anything whatsoever, just be grateful for what they already did. And I agree with that. But it is nevertheless no good getting dependent on a dead project, and I'm sure the contributers to jest can see this perspective is also valid.

thedag avatar Apr 25 '25 19:04 thedag

Issue still exists in jest@next, stale-bot.

anomiex avatar Apr 26 '25 16:04 anomiex

+1

soderlundf avatar Apr 26 '25 16:04 soderlundf

+1

kurly-dykim avatar May 08 '25 08:05 kurly-dykim

This issue still exist for npm install jest@next

Ahineja avatar May 20 '25 11:05 Ahineja