-
Describe the bugHow to eliminate warning? WARN You (or an addon) are using the 'config' preset field. This has been replaced by 'previewAnnotations' and will be removed in 8.0 To Reproducestorybook dev -p 6006 SystemEnvironment Info:
System:
OS: Windows 10 10.0.22621
CPU: (44) x64 Intel(R) Xeon(R) CPU E5-2696 v4 @ 2.20GHz
Binaries:
Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.1.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.1848.0), Chromium (114.0.1823.67)
npmPackages:
@storybook/addon-essentials: 7.0.26 => 7.0.26
@storybook/addon-links: 7.0.26 => 7.0.26
@storybook/blocks: 7.0.26 => 7.0.26
@storybook/nextjs: ^7.0.26 => 7.0.26
@storybook/react: 7.0.26 => 7.0.26 Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I've combed all through my code and the Storybook docs to try to find what is causing this warning for me and I can't figure it out. I found the migration docs that note the change for 7.0, but it wasn't clear what the context is and what |
Beta Was this translation helpful? Give feedback.
-
Same warning with storybook & co version |
Beta Was this translation helpful? Give feedback.
-
i think the deprecation message can be improved a little bit. but here's what i found |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tip @bazy1983 ! If you find an addon that needs to be updated, we have an umbrella issue here with more info on how to go about it #20529 |
Beta Was this translation helpful? Give feedback.
-
@shilman thanks for the reply. |
Beta Was this translation helpful? Give feedback.
i think the deprecation message can be improved a little bit. but here's what i found
in
@storybook/core-server/dist/presets/common-preset.js
file, there is a function calledpreviewAnnotations
that reads your main.js(ts) and try to find a propertyconfig
either in your configuration json or in any of your addons.if that function detects
config
property, it will fire the deprecation warning message.in my case, the deprecation was fired because of
@storybook/addon-knobs
.the easy way to figure out what triggers the deprecation message in your setup is to go to the
common-preset.js
innode_modules
. search for the deprecation message. add aconsole.log(config)
then run storybook. it will l…