nuxt-modules / tailwindcss

Tailwind CSS module for Nuxt
https://tailwindcss.nuxtjs.org
MIT License
1.69k stars 183 forks source link

Transitive dependency on deprecated inflight package has memory leaks #894

Closed anviksuteiriy closed 3 months ago

anviksuteiriy commented 3 months ago

Environment

Production

Reproduction

No response

Describe the bug

It's clearly mentioned that glob@7.2.3 has inflight@1.0.6 which has memory leaks and same is there for this package also. If upgraded to glob to 10.4.5 or above it will fix the issue. This leak is causing crashes on production application.

This was there with @nuxtjs/i18n and they has upgraded to glob@10.4.5 and their leaks have been resolved

@nuxtjs/tailwindcss@6.6.0 | -- tailwind-config-viewer@1.7.2 |-- replace-in-file@6.3.5 | -- glob@7.2.3 |-- inflight@1.0.6

Additional context

This causes crashes in few hours

Logs

npm warn deprecated inflight@1.0.6: 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 readdir-scoped-modules@1.1.0: This functionality has been moved to @npmcli/fs
npm warn deprecated debuglog@1.0.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated read-package-json@2.1.2: This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.1.6: Glob versions prior to v9 are no longer supported
npm warn deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm warn deprecated read-installed@4.0.3: This package is no longer supported.
npm warn deprecated sinon@11.1.2: 16.1.1
ineshbose commented 3 months ago

Sorry, I think you should be on the latest version of the module that upgrades tailwind-config-viewer to v2 with some peer dependency upgraded as well, but the dependency resolution only depends on your project, so if it continues to resolve glob to v7, you may need to use overrides.

anviksuteiriy commented 3 months ago

Screenshot from 2024-08-28 15-29-50 upgraded to latest version and still the same version of glob @ineshbose

ineshbose commented 3 months ago

You can use overrides.

anviksuteiriy commented 3 months ago

got it, i can use overrides but when reported to nuxt i18n package glob version updated with their latest version

ineshbose commented 3 months ago

Can you link the issue for that please? I'm guessing that the package would be using glob directly, while we have an upstream dependency using glob for this module.

anviksuteiriy commented 3 months ago

here is the link https://github.com/nuxt-modules/i18n/issues/2612