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

Inflight Deprecation Warning #12258

Closed
ananduremanan opened this issue May 24, 2024 · 42 comments · Fixed by #12642
Closed

Inflight Deprecation Warning #12258

ananduremanan opened this issue May 24, 2024 · 42 comments · Fixed by #12642
Milestone

Comments

@ananduremanan
Copy link

ananduremanan commented May 24, 2024

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

@eltigerchino
Copy link
Member

eltigerchino commented May 24, 2024

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

@Conduitry
Copy link
Member

Conduitry commented May 24, 2024

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?

@aymanin
Copy link

aymanin commented May 26, 2024

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

@ranaaboubakr
Copy link

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.

@ananduremanan
Copy link
Author

ananduremanan commented May 28, 2024

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.

@Srossiprieto
Copy link

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

@ananduremanan
Copy link
Author

ananduremanan commented May 30, 2024

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

@ranaaboubakr
Copy link

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

@ananduremanan
Copy link
Author

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.

@BrunaMarjorie
Copy link

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

@eltigerchino
Copy link
Member

eltigerchino commented May 30, 2024

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.

@Srossiprieto
Copy link

Srossiprieto commented May 30, 2024

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?

@KikoB10
Copy link

KikoB10 commented May 30, 2024

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

@SugarD-x
Copy link

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.

@Chefkochcooking
Copy link

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

@ananduremanan
Copy link
Author

ananduremanan commented May 31, 2024

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.

@lorand-horvath
Copy link

lorand-horvath commented May 31, 2024

This is caused by eslint@8 transient dependencies being deprecated, see report eslint/eslint#18528

@kudo07
Copy link

kudo07 commented Jun 2, 2024

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

@lorand-horvath
Copy link

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

@benmccann
Copy link
Member

svelte-check should remove its dependency on svelte-preprocess: sveltejs/language-tools#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
Copy link
Member

We should also probably remove sorcery from svelte-preprocess: sveltejs/svelte-preprocess#637

@DevAloshe
Copy link

DevAloshe commented Jun 12, 2024

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

@benmccann
Copy link
Member

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 (sveltejs/language-tools#2401) or see if the dependency on it can be removed (sveltejs/language-tools#2391).

@iamjexcdevvv
Copy link

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?

@eltigerchino
Copy link
Member

eltigerchino commented Jul 26, 2024

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 #12258 (comment) . We’ll have to wait a bit before updating to get rid of this warning

@ankitbavne
Copy link

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 ladjs/superagent#1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net

@lorand-horvath
Copy link

lorand-horvath commented Jul 26, 2024

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

@ankitbavne
Copy link

ankitbavne commented Jul 26, 2024

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 ladjs/superagent#1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net

@lorand-horvath
Copy link

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.

@ankitbavne
Copy link

@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?

@benmccann
Copy link
Member

You should not have to set overrides for eslint. Upgrade to eslint 9 instead. You can create a new SvelteKit project if you want to see an example of what it looks like to use eslint 9

@chris-avens
Copy link

@benmccann upgrading to eslint 9 causes npm error
[email protected] invalid: "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" from node_modules/eslint-plugin-react-hooks

@benmccann
Copy link
Member

I wouldn't think you need eslint-plugin-react-hooks in a Svelte project. If you do, then you'll need to upgrade to the latest version and if the latest still doesn't support eslint 9 then that will need to be fixed in that plugin

@CJ-78

This comment was marked as off-topic.

@benmccann
Copy link
Member

We have started working on a new major version of svelte-check to fix this issue. The new version will drop these dependencies and many others. It will be probably a few weeks until it's ready due to vacation schedules and other commitments, but I'm excited about the improvements.

@ansAGujar

This comment was marked as off-topic.

@dominikg
Copy link
Member

dominikg commented Aug 6, 2024

it looks like this issue comes up high when searching for the warning. Please refrain from posting help requests or adding "me too" comments

@pracplayopen
Copy link

fwiw i tried both 'override' workarounds (including removing node_modules, package-lock.json and re-running npm install each time) and neither affected the inflight memory leak error at all.

i also find it strange that this has been happening FOR MONTHS in the default- "everybody should create a new project this way" method, and this is generating errors and memory leaks. isn't svelte more polished that it has something that can be expected to work out of the box? seems weird to be editing package.json for new project built from a template. i appreciate the hard work and svelte does seem pretty interesting, but it's frustrating when the most basic things w/a new project need immediate maintenance... esp for a framework that's supposed to be EASIER.

@eltigerchino eltigerchino added this to the soon milestone Sep 4, 2024
@eltigerchino
Copy link
Member

eltigerchino commented Sep 4, 2024

https://github.com/sveltejs/language-tools/releases/tag/svelte-check-4.0.0 just released a few days ago and removes the dependency on the old version of svelte-preprocess that depends on inflight. We'll need to bump the version of svelte-check in SvelteKit.

EDIT: #12642 and #12638 solve this so we'll just need to cut a release after

@benmccann
Copy link
Member

Yeah, I merged the fix on Monday, but hadn't cut a release yet. I just did that now, so new projects should no longer generate these warnings.

If you encounter this, please upgrade your project to svelte-check 4. If you have svelte-preprocess in your project make sure it's on version 6 or usually the better solution is to replace it with vitePreprocess: https://kit.svelte.dev/docs/integrations#vitepreprocess

This was difficult to fix because we had to fix so many different dependencies and cut major releases of multiple packages.

We've really reduced the number of dependencies by a lot during this process so that we're much less likely to hit these types of issues in the future. Compare https://npmgraph.js.org/?q=svelte-check@4 vs https://npmgraph.js.org/?q=svelte-check@3. There are plans to remove a majority of the remaining dependencies by upgrading to the upcoming chokidar v4 when it is released.

@ankitbavne

This comment was marked as off-topic.

@eltigerchino
Copy link
Member

eltigerchino commented Sep 6, 2024

it looks like this issue comes up high when searching for the warning. Please refrain from posting help requests or adding "me too" comments

If you’re experiencing this issue and you’re not using SvelteKit or svelte check, we cannot help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.