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

Core: Fix node 18 ip support #18330

Merged
merged 1 commit into from May 27, 2022
Merged

Core: Fix node 18 ip support #18330

merged 1 commit into from May 27, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented May 25, 2022

Issue: #18019

What I did

Running yarn storybook with Node 18 fails with the following issue:

image

There was an undocumented change to the "family" attribute in os.networkInterfaces() in Node 18 which made family become a number rather than string, as it was before. Therefore that breaks Storybook.

This PR bumps ip to 2.0.0. Honestly it doesn't seem like 2.0.0 has breaking changes. The real change was this which is backwards compatible.

How to test

To test this out I did:

1 - Access a Storybook project e.g. MealDrop
2 - Set node to 18
3 - Run yarn storybook -> See failure
4 - Add resolutions to package.json

  "resolutions": {
    "ip": "^2.0.0"
  }

5 - Run yarn then yarn storybook -> See success

Would be nice to do more testing, though I'd require assistance (maybe releasing a canary?)

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@nx-cloud
Copy link

nx-cloud bot commented May 25, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d001760. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@shilman shilman changed the title feat: support node 18 Core: support node 18 May 27, 2022
@shilman shilman changed the title Core: support node 18 Core: Fix node 18 ip support May 27, 2022
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label May 27, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shilman shilman merged commit d76534a into next May 27, 2022
@shilman shilman deleted the fix/node-18-support branch May 27, 2022 03:56
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label May 27, 2022
shilman added a commit that referenced this pull request May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants