Deprecated Storybook addon that serves as a migration helper for users upgrading to Storybook 9.0+
npx @tessl/cli install tessl/npm-storybook--addon-controls@9.0.0The @storybook/addon-controls package is a deprecated migration helper for Storybook 9.0+. It does not provide any functional API - instead, it throws an error when imported to guide users through the Storybook 9.0 migration process. The controls functionality has been consolidated into other Storybook packages as part of the package structure changes.
npm install @storybook/addon-controls (not recommended)All import patterns result in the same migration error being thrown:
import '@storybook/addon-controls';CommonJS:
const controls = require('@storybook/addon-controls');Import from specific entry points:
import '@storybook/addon-controls/preview';
import '@storybook/addon-controls/manager';
import '@storybook/addon-controls/register';This package intentionally has no functional usage. All imports immediately throw an error to guide migration:
// This will throw an error
import '@storybook/addon-controls';
// Error thrown:
// "Your Storybook project is referring to package @storybook/addon-controls,
// which no longer exists in Storybook 9.0 and above. Please refer to the
// Storybook 9 migration guide for instructions on how to fix this issue:
// https://storybook.js.org/docs/9/migration-guide#package-structure-changes"This package uses a simple error-throwing architecture:
error.ts file containing the migration error messageindex.ts, preview.tsx, manager.tsx) import and execute the error moduleThe sole capability of this package is to throw a descriptive error that guides users to the migration documentation.
/**
* All entry points import this error module which immediately throws
* a migration error with guidance to the Storybook 9 migration guide
*/
declare const migrationError: never;Error Details:
ErrorIn Storybook 9.0+, the controls functionality has been consolidated into other packages. Users must:
@storybook/addon-controls from their configurationThe controls functionality is now built into the core Storybook experience and does not require a separate addon package. Refer to the official Storybook documentation for current controls usage patterns.
All package entry points defined in package.json lead to the same error-throwing behavior:
// Main entry (.)
declare module '@storybook/addon-controls' {
// Immediately throws migration error
}
// Preview entry (./preview)
declare module '@storybook/addon-controls/preview' {
// Immediately throws migration error
}
// Manager entry (./manager and ./register)
declare module '@storybook/addon-controls/manager' {
// Immediately throws migration error
}
declare module '@storybook/addon-controls/register' {
// Immediately throws migration error
}Since this package only throws errors, there is no error handling beyond the migration error itself. Users encountering this error should follow the migration guide rather than attempting to catch or handle the error.