Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated inflight dependency #17306

Closed
7 tasks done
MaxioTech opened this issue May 24, 2024 · 18 comments
Closed
7 tasks done

Deprecated inflight dependency #17306

MaxioTech opened this issue May 24, 2024 · 18 comments
Labels
p1-chore Doesn't change code behavior (priority)

Comments

@MaxioTech
Copy link

MaxioTech commented May 24, 2024

Describe the bug

Today when I was setting up a new project, I got the following message when installing dependencies:

"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."

Reproduction

npm create vite@latest

Steps to reproduce

Run 'npm install'

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
    Memory: 21.63 GB / 31.94 GB
Binaries:
   Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
   npm: 10.5.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
   Edge: Spartan (44.19041.3636.0), Chromium (123.0.2420.97)
   Internet Explorer: 11.0.19041.3636
npmPackages:
   @vitejs/plugin-react-swc: ^3.5.0 => 3.7.0
   vite: ^5.2.0 => 5.2.11

Used Package Manager

npm

Logs

No response

Validations

@exceedxo
Copy link

Same issue here

@bluwy
Copy link
Member

bluwy commented May 27, 2024

In Vite's lockfile, inflight is used by glob v8 and v7, which both are used by various dependencies including:

  • @rollup/plugin-commonjs v25.0.4
  • npm-packlist v5.1.3
  • rimraf v3.0.2
  • rollup-plugin-license v3.4.0
  • stylus v0.63.0
  • sucrase v3.32.0

Some are probably dev deps, but just listing these from the lockfile, and we need to update them first before we can remove inflight from the dependencies.

@bluwy bluwy changed the title deprecated dependency Deprecated inflight dependency May 27, 2024
@bluwy bluwy added p1-chore Doesn't change code behavior (priority) and removed pending triage labels May 27, 2024
@swasthik-007
Copy link

what do i do now???

@bluwy
Copy link
Member

bluwy commented May 27, 2024

Ignore it? It isn't breaking anything. Or you could try to see if the packages I mentioned above have moved away from inflight and if so, try to update them in Vite?

@swasthik-007
Copy link

okay Thank You

@ajibadey405

This comment has been minimized.

@lorand-horvath
Copy link

lorand-horvath commented May 31, 2024

@bluwy The issue is coming from eslint@8, dependency tree:

"eslint": "^8.57.0"
  "file-entry-cache": "^6.0.1"
    "flat-cache": "^3.0.4"
      "rimraf": "^3.0.2" - deprecated
        "glob": "^7.1.3" - deprecated
          "inflight": "^1.0.4" - deprecated, leaks memory

The only viable solution I see is vite updating to eslint@9. Or eslint@8 fixing their deps (bump to file-entry-cache@8).

Temporary workaround: add file-entry-cache override to package.json, delete package-lock.json and npm install

  "overrides": {
    "eslint": {
      "file-entry-cache": "^8.0.0"
    }
  }

@adewaleftk
Copy link

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.
. I just experienced this same issue few minutes ago on my Kali Linux OS

@lorand-horvath
Copy link

lorand-horvath commented Jun 3, 2024

Just use the workaround I described above in #17306 (comment)
eslint is a mess right now. v9 is barely 3% of all weekly downloads, but for the rest of us 97% still using v8, they won't fix it just because: eslint/eslint#18528 (comment)

@Sophyane
Copy link

Sophyane commented Jun 5, 2024

Could we avoid the issue if we simply update Eslint to V9 ?

@Srossiprieto
Copy link

Srossiprieto commented Jun 5, 2024

So, by migrating to version 9, those warnings would disappear? If that's the case, we would only need to run the command globally?

@bluwy
Copy link
Member

bluwy commented Jun 6, 2024

For eslint, which only comes from Vite's react templates, #12860 will migrate it to eslint v9, however there seems to be some blockers before we can do that.

@bluwy
Copy link
Member

bluwy commented Jun 10, 2024

#17431 removes the inflight dependency that's bundled within Vite. However, I'll still keep this open for the eslint template case.

@Srossiprieto
Copy link

Any news on this?
If so, how should I go about removing these warnings?
I don't know much about this; I appreciate the work you're doing.
Thanks!
@bluwy

@lorand-horvath
Copy link

lorand-horvath commented Jun 25, 2024

Any news on this? If so, how should I go about removing these warnings?

@Srossiprieto See the workaround I posted in #17306 (comment)

You could also override the @humanwhocodes deprecations, so if you don't want to see any eslint 8-related warnings anymore, add the following to package.json, delete node_modules and package-lock.json, then run npm install

  "overrides": {
    "eslint": {
      "@humanwhocodes/config-array": "npm:@eslint/config-array",
      "file-entry-cache": "^8.0.0"
    }
  }

@edinoteK
Copy link

я вот честно сюда когда захожу, вообще без плнятия , что где, мне б Русификатор...

@chiragjain307
Copy link

chiragjain307 commented Jul 4, 2024

I am also getting the same warning
First i run the command: "npm create vite@latest" to create a new npm project, after that when i run command "npm i", with the installation of node module i get these 5 warnings:

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 @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead

@bluwy
Copy link
Member

bluwy commented Aug 7, 2024

#12860 has been merged and released in create-vite 5.5.0, which bumps the eslint templates to v9

@bluwy bluwy closed this as completed Aug 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

No branches or pull requests