Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
Issue Summary:
Running Storybook in the Dnn.React.Common project throws a module resolution error related to a deprecated or missing addon:
ERROR in ./.storybook/addons.js
Module not found: Error: Can't resolve '@storybook/addon-actions/register' in 'E:\DevDnn\Dnn.AdminExperience\ClientSide\Dnn.React.Common\.storybook'
@ ./.storybook/addons.js 6:0-43
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./.storybook/addons.js ./node_modules/@storybook/core/dist/client/manager/index.js
Steps to Reproduce:
- Navigate to the Dnn.React.Common project directory.
- Run Storybook via npm run storybook or yarn storybook.
- Observe the error in the terminal.
Analysis:
The file .storybook/addons.js references:
import '@storybook/addon-actions/register';
This syntax has been deprecated in recent Storybook versions (6.0+). The register entry points were removed, and addons should now be declared in the array format in .storybook/main.js:
addons: ['@storybook/addon-actions', '@storybook/addon-links', ...]
Suggested Fix:
Migrate addons.js content to main.js if not already done.
Update Storybook and its addons to the latest version.
Replace deprecated addon syntax accordingly.
Environment Details:
Project: Dnn.React.Common
Storybook Version: (unknown, likely <6.0 — please confirm)
OS: Windows
Node Version: (please specify)
Package Manager: (npm or yarn — please specify)
Priority:
Medium — Storybook cannot currently be executed for this project.
Steps to reproduce?
Open a terminal window.
Navigate to the project directory:
cd E:\DevDnn\Dnn.AdminExperience\ClientSide\Dnn.React.Common
Run :
yarn install
Run the Storybook start command:
yarn storybook
Wait for the bundling process.
Observe the error message in the terminal:
Module not found: Error: Can't resolve '@storybook/addon-actions/register' ...
Current Behavior
No response
Expected Behavior
No response
Relevant log output
Anything else?
No response
Affected Versions
10.0.1 (latest v10 release)
What browsers are you seeing the problem on?
Chrome
Code of Conduct
- I agree to follow this project's Code of Conduct