Dev server breaks with Node 18.0.0 + node-ip 1.1.5
See original GitHub issueDescribe the bug When updating to Node 18.0.0 start-storybook breaks with
TypeError: details.family.toLowerCase is not a function
at .../node_modules/ip/lib/ip.js:385:39
at .../node_modules/ip/lib/ip.js:384:37
at .../node_modules/ip/lib/ip.js:379:37
at .../node_modules/@storybook/core-server/dist/cjs/utils/server-address.js:20:55
To Reproduce
Launch a start-storybook
with Node 18.0.0 and node-ip@1.1.5.
System
System: OS: Windows 10 10.0.19044 CPU: (24) x64 12th Gen Intel® Core™ i9-12900KF Binaries: Node: 16.14.2 - C:\Program Files\nodejs\node.EXE npm: 8.6.0 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.44) npmPackages: @storybook/addon-a11y: ^6.4.22 => 6.4.22 @storybook/addon-docs: ^6.4.18 => 6.4.22 @storybook/addon-essentials: ^6.4.22 => 6.4.22 @storybook/addons: ^6.4.18 => 6.4.22 @storybook/builder-webpack5: ^6.4.18 => 6.4.22 @storybook/manager-webpack5: ^6.4.18 => 6.4.22 @storybook/theming: ^6.4.18 => 6.4.22 @storybook/vue3: ^6.4.18 => 6.4.22
Additional context This is caused by the following Node 18 introduced Undocumented change to “family” attribute in os.networkInterfaces() in Node 18. Issue on node-ip along with a PR has been submitted.
Issue Analytics
- State:
- Created a year ago
- Reactions:23
- Comments:15 (4 by maintainers)
Found a workaround.
The error only comes if Storybook attempts to figure out the current network address If the host option is set then the problem is avoided.
So passing
-h localhost
to start-storybook bypasses the problem.Thank you so much! That solved it for me.