kit icon indicating copy to clipboard operation
kit copied to clipboard

Inflight Deprecation Warning

Open anandhuremanan opened this issue 1 year ago • 38 comments

Describe the bug

On Installing dependencies after npm create svelte@latest I got 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. Not sure if it is serious or not, saw leaks memory in it thus opened this issue.

Reproduction

By Installing dependencies after npm create svelte@latest.

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-1235U
    Memory: 4.47 GB / 15.73 GB
  Binaries:
    Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
  Browsers: {}
  npmPackages:
    @sveltejs/adapter-auto: latest => 3.2.1
    @sveltejs/kit: latest => 2.5.10
    @sveltejs/vite-plugin-svelte: latest => 3.1.0
    svelte: latest => 4.2.17
    vite: latest => 5.2.11

Severity

annoyance

Additional Information

No response

anandhuremanan avatar May 24 '24 08:05 anandhuremanan

We should move this issue to https://github.com/sveltejs/svelte-preprocess as it comes from the sorcery dependency svelte-preprocess relies on.

❯ npm why inflight
[email protected] dev
node_modules/inflight
  inflight@"^1.0.4" from [email protected]
  node_modules/glob
    glob@"^7.1.3" from [email protected]
    node_modules/rimraf
      rimraf@"^2.5.2" from [email protected]
      node_modules/sander
        sander@"^0.5.0" from [email protected]
        node_modules/sorcery
          sorcery@"^0.11.0" from [email protected]
          node_modules/svelte-preprocess
            svelte-preprocess@"^5.1.3" from [email protected]
            node_modules/svelte-check
              dev svelte-check@"^3.6.0" from the root project

teemingc avatar May 24 '24 13:05 teemingc

Wouldn't the fix be to bump dependencies in https://github.com/Rich-Harris/sander, not svelte-preprocess? Or, perhaps, to just start using built-in filesystem APIs instead in https://github.com/Rich-Harris/sorcery?

Conduitry avatar May 24 '24 13:05 Conduitry

hello when i do the command to install nodered i have this error ,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]: This package is no longer supported. 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 [email protected]: This package is no longer supported. npm warn deprecated [email protected]: This package is no longer supported. what i can do?thank you

aymanin avatar May 26 '24 15:05 aymanin

I'm getting this error while trying to install Appium, any idea how it can be resolved?

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]: This package is no longer supported. 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 [email protected]: This package is no longer supported. npm warn deprecated [email protected]: This package is no longer supported.

ranaaboubakr avatar May 28 '24 00:05 ranaaboubakr

I'm getting this error while trying to install Appium, any idea how it can be resolved?

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]: This package is no longer supported. 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 [email protected]: This package is no longer supported. npm warn deprecated [email protected]: This package is no longer supported.

The author of inflight deprecated the package on Mar 22. https://github.com/isaacs/inflight-DEPRECATED-DO-NOT-USE/issues/5#issuecomment-2126153820

This is common with JavaScript since anyone can came up with a package and when it got deprecated we get a bunch of errors or warnings.

anandhuremanan avatar May 28 '24 03:05 anandhuremanan

@ananduremanan what should we do with the warnings that appear to us?

Srossiprieto avatar May 29 '24 23:05 Srossiprieto

@ananduremanan what should we do with the warnings that appear to us?

If the package actually causes a memory leak, it would be a serious problem. The best we can do is find the package that uses inflight (as @eltigerchino mentioned in his comment), replace it with lru-cache as the author of inflight suggests, and open a pull request. Alternatively, we could wait for some cool guy from the open-source community(like @Conduitry above) to fix it.

anandhuremanan avatar May 30 '24 02:05 anandhuremanan

is this issue on windows devices only or with mac users too?

ranaaboubakr avatar May 30 '24 08:05 ranaaboubakr

is this issue on windows devices only or with mac users too?

I don't think so. When a package is deprecated it affects all users of that package, regardless of their operating system.

anandhuremanan avatar May 30 '24 08:05 anandhuremanan

I am also having this problem when upgrading Capacitor from v.5 to v.6. I am a mac user.

BrunaMarjorie avatar May 30 '24 13:05 BrunaMarjorie

You can run npm why inflight or pnpm why inflight to figure out which packages are depending on the deprecated package. In svelte-check’s case we will probably fix it by removing the dependency on inflight; replacing it with native APIs or a different package.

teemingc avatar May 30 '24 14:05 teemingc

I have a problem when creating a project with Vite using the command npm create vite@latest. I go through all the configuration steps, but when I run the command npm install, I get warnings. This started happening after I followed a tutorial that used ESLint with the command npx eslint --init. Since then, these warnings have appeared in each of my projects. Would you like me to run any command so you can see what might be going wrong?

Srossiprieto avatar May 30 '24 15:05 Srossiprieto

I am also trying to install Appium and have gotten the same error message about inflight and a few other things. When I run npm why inflight terminal says ' no dependencies found matching inflight'

I am a bit lost as to what to do next? Do we just wait for a fix? I am fairly new to this and totally new to automated testing

KikoB10 avatar May 30 '24 15:05 KikoB10

I am also trying to install Appium and have gotten the same error message about inflight and a few other things. When I run npm why inflight terminal says ' no dependencies found matching inflight'

I am a bit lost as to what to do next? Do we just wait for a fix? I am fairly new to this and totally new to automated testing

I'm using a completely different project that depends on inflight as a sub-dependency, but I saw your post from a Google search and thought I'd pass along some information. I don't know anything about this project, but if it creates a package-lock.json after installation, you may be able to look in there to see what dependencies rely on it, and backtrack it to the parent one from there. That should give you your answer on which dependency is at fault.

SugarD-x avatar May 30 '24 19:05 SugarD-x

Hey guys! I'm working on an web app rn and thus installed bun in VSCode. The installation was successfully but I am still concerned about those lines...

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]: Rimraf versions prior to v4 are no longer supported npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported

I am a newbie in the coding space. Any steps to solve this problem?

Thank you! ChiefCook

Chefkochcooking avatar May 30 '24 21:05 Chefkochcooking

I think Updating glob and mocha in https://github.com/Rich-Harris/sander and https://github.com/Rich-Harris/sorcery may fix issues related to SvelteKit. Both of these packages use a lot of deprecated packages and haven't been updated for years.

anandhuremanan avatar May 31 '24 06:05 anandhuremanan

This is caused by eslint@8 transient dependencies being deprecated, see report https://github.com/eslint/eslint/issues/18528

lorand-horvath avatar May 31 '24 06:05 lorand-horvath

I'm getting this error while trying to install Appium, any idea how it can be resolved? 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]: This package is no longer supported. 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 [email protected]: This package is no longer supported. npm warn deprecated [email protected]: This package is no longer supported.

The author of inflight deprecated the package on Mar 22. isaacs/inflight-DEPRECATED-DO-NOT-USE#5 (comment)

This is common with JavaScript since anyone can came up with a package and when it got deprecated we get a bunch of errors or warnings.

just downgrade the node into 18 may things works because i did it in next js it works in 20 version but not in 22 or just remove eslint problem solve

kudo07 avatar Jun 02 '24 15:06 kudo07

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

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

lorand-horvath avatar Jun 02 '24 20:06 lorand-horvath

svelte-check should remove its dependency on svelte-preprocess: https://github.com/sveltejs/language-tools/issues/2391. That would fix this issue for the majority of SvelteKit users and reduce the number of dependencies, which is always good. We should still fix svelte-preprocess for the users who are using it directly

benmccann avatar Jun 08 '24 05:06 benmccann

We should also probably remove sorcery from svelte-preprocess: https://github.com/sveltejs/svelte-preprocess/issues/637

benmccann avatar Jun 11 '24 21:06 benmccann

is this issue on windows devices only or with mac users too?

with mac os too

I got this error when installing whatsapp-wep.js package

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]: Rimraf versions prior to v4 are no longer supported 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 npm WARN deprecated [email protected]: This package is no longer supported. npm WARN deprecated [email protected]: < 22.6.4 is no longer supported

DevAloshe avatar Jun 12 '24 23:06 DevAloshe

All dependencies have now been removed from svelte-preprocess: https://x.com/BenjaminMcCann/status/1810698991820321028

Now we'll need to either update svelte-check to use this new version (https://github.com/sveltejs/language-tools/pull/2401) or see if the dependency on it can be removed (https://github.com/sveltejs/language-tools/issues/2391).

benmccann avatar Jul 09 '24 15:07 benmccann

Hello I have the same error I am new to this so I have no idea what should I do, do you guys have a solution or just wait for an update or something?

iamjexcdevvv avatar Jul 26 '24 01:07 iamjexcdevvv

Hello I have the same error I am new to this so I have no idea what should I do, do you guys have a solution or just wait for an update or something?

Hi jexc. Yes, see https://github.com/sveltejs/kit/issues/12258#issuecomment-2218052620 . We’ll have to wait a bit before updating to get rid of this warning

teemingc avatar Jul 26 '24 01:07 teemingc

Hello, I am getting an npm deprecated warning in my NestJS project. Please help me get rid of this warning

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 [email protected]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: Glob versions prior to v9 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 npm warn deprecated [email protected]: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net

ankitbavne avatar Jul 26 '24 07:07 ankitbavne

Add this to package.json, remove node_modules and package-lock.json, then execute npm install

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

lorand-horvath avatar Jul 26 '24 07:07 lorand-horvath

Some warnings have gone, but some are still there.

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 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net

ankitbavne avatar Jul 26 '24 07:07 ankitbavne

You either did not do exactly what I suggested: Add to package.json, remove node_modules and package-lock.json, then execute npm install or there is another package that is dependent on eslint and you would need to also add that to overrides.

lorand-horvath avatar Jul 26 '24 09:07 lorand-horvath

@lorand-horvath
Yes, I did it and it works fine, but I have a doubt- is using overrides in package.json safe? I mean, will it not create problems in the future?

ankitbavne avatar Jul 26 '24 10:07 ankitbavne