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

[Bug]: Inflight has been deprecated #27259

Closed
crimson206 opened this issue May 23, 2024 · 11 comments · Fixed by #27366
Closed

[Bug]: Inflight has been deprecated #27259

crimson206 opened this issue May 23, 2024 · 11 comments · Fixed by #27366
Labels
dependencies maintenance User-facing maintenance tasks sev:S3

Comments

@crimson206
Copy link

Describe the bug

warning @storybook/addon-essentials > @storybook/core-common > tempy > del > rimraf > glob > 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.

Reproduction link

none

Reproduction steps

No response

System

System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 21.7.2 - ~/.nvm/versions/node/v21.7.2/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v21.7.2/bin/yarn <----- active
    npm: 10.5.0 - ~/.nvm/versions/node/v21.7.2/bin/npm
  npmPackages:
    @storybook/addon-essentials: 8.1.3 => 8.1.3 
    @storybook/addon-interactions: 8.1.3 => 8.1.3 
    @storybook/addon-links: 8.1.3 => 8.1.3 
    @storybook/blocks: 8.1.3 => 8.1.3 
    @storybook/components: 8.1.3 => 8.1.3 
    @storybook/core-events: 8.1.3 => 8.1.3 
    @storybook/manager: 8.1.3 => 8.1.3 
    @storybook/manager-api: 8.1.3 => 8.1.3 
    @storybook/preview: 8.1.3 => 8.1.3 
    @storybook/preview-api: 8.1.3 => 8.1.3 
    @storybook/react: 8.1.3 => 8.1.3 
    @storybook/react-vite: 8.1.3 => 8.1.3 
    @storybook/test: 8.1.3 => 8.1.3 
    @storybook/theming: 8.1.3 => 8.1.3 
    @storybook/types: 8.1.3 => 8.1.3 
    chromatic: ^11.4.0 => 11.4.0 
    storybook: ^8.1.3 => 8.1.3

Additional context

No response

@ChetSocio
Copy link

Why is this closed? I am still getting this error when using npx storybook@latest init :

Error: Unable to find versions of @storybook/cli using npm
    at NPMProxy.runGetVersions (C:\Users\dummy\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\@storybook\core-common\dist\index.js:37:639)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async doInitiate (C:\Users\dummy\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\@storybook\cli\dist\generate.js:146:992)
    at async withTelemetry (C:\Users\dummy\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\@storybook\core-server\dist\index.js:28:3599)
    at async initiate (C:\Users\dummy\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\@storybook\cli\dist\generate.js:180:245)

@valentinpalkovic
Copy link
Contributor

@ChetSocio I think you have answered on the wrong issue

@ChetSocio
Copy link

@ChetSocio I think you have answered on the wrong issue

I have not answered anything. I am stating that the issue still persists even on latest version. I was not getting this a momth ago but after downloading latest update of storybook, this error is happening. I want someone to tell me how to solve this problem

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented May 26, 2024

@ChetSocio Neither is this issue closed nor has it anything to do with your mentioned error message: I think you are referring to this issue: #26553

But even the linked issue is not closed. Can you please clarify, which issue is closed and how your error message relates to this inflight deprecation issue?

@ChetSocio
Copy link

Yeah sorry! I was about to comment on the issue #26553 But there was a link to this issue and i clicked in it and forgot as both
Inflight has been depreciated
and
Error: Unable to find versions of @storybook/cli using npm
were appearing in my terminal when i did:
npx storybook@latest init

and even tried installing @storybook/cli manually but no benefit.
The fact that I was not getting this error few months ago cannot be ignored. Everyone is getting this error after latest upgrade.

@anomiex
Copy link

anomiex commented Jun 11, 2024

While #27366 fixed the dependency path originally described, there's another also depending on inflight.

$ npm add storybook
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 rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 638 packages in 19s

@storybook/cli and @storybook/codemod both depend on jscodeshift 0.15.2 → temp 0.8.4 → rimraf 2.6.3 → glob 7.2.3 → inflight 1.0.6.

@anomiex
Copy link

anomiex commented Jun 11, 2024

Also @storybook/preset-react-webpack@storybook/react-docgen-typescript-plugin 1.0.6--canary.9.0c3f3b7.0 → flat-cache 3.2.0 → rimraf 3.0.2 → glob 7.2.3 → inflight 1.0.6.

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Jun 11, 2024

@anomiex Could you open an issue here to update flash-cache to its latest version (which should remove the transitive inflight dependency).

For the transitive dependency in jscodeshift I don’t really see a fix. They would have to replace either temp by another package or temp needs an update to use the latest rimraf version

@hroomdeveloper
Copy link

same story here npx sb init
Uploading 2024-08-07T09_39_54_535Z-debug-0.log…

npm error A complete log of this run can be found in: C:\Users\рс\AppData\Local\npm-cache_logs\2024-08-07T09_39_36_574Z-debug-0.log
PS D:\materio-mui-nextjs-admin-template-v4.0.0-q2itdi (1)\materio-mui-nextjs-admin-template-v4.0.0\javascript-version\full-version> npx sb init
Need to install the following packages:
sb@8.2.7
Ok to proceed? (y) y

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 rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn cleanup Failed to remove some directories [

@crimson206
Copy link
Author

As I recall, it's just a warning, not a serious error.

In my opinion, it would be difficult to suppress all the warnings.
The Storybook team would know better if this warning is crucial or not.
I'm not sure how clean the Storybook team wants to make the installation process.
If you want to make it as clean as possible, but don't want to waste time on minor issues,
how about adding some warning-ignoring setup for known minor warnings according to the verbosity level?

@anomiex
Copy link

anomiex commented Aug 7, 2024

The warnings come from npm before Storybook's setup gets a chance to run, so a "warning-ignoring setup" seems unlikely.

Separating the jscodemod stuff, which as far as I know is only used for setup and upgrading, from the parts of the CLI used for actually running Storybook might help with the warning in day-to-day usage. But whether Storybook devs want to go to that trouble, I don't know.

hipstersmoothie/react-docgen-typescript-plugin#95 now exists to upgrade flat-cache in that dependency path, but @hipstersmoothie hasn't replied on that yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies maintenance User-facing maintenance tasks sev:S3
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants