headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

Storybook fails in a new plugin

Open sniok opened this issue 2 months ago • 0 comments

When creating a new plugin from scratch, storybook doesn't work.

Headlamp plugin version "0.9.2"

➜  test-plugin npm run storybook

> [email protected] storybook
> headlamp-plugin storybook

headlampPluginBin path: /home/dubenko/test-plugin/node_modules/@kinvolk/headlamp-plugin/bin/headlamp-plugin.js
@storybook/cli v7.6.19

SB_CORE-COMMON_0002 (InvalidFrameworkNameError): Invalid value of '@storybook/react' in the 'framework' field of Storybook config.

Please run 'npx storybook@next automigrate' to automatically fix your config.

More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api

    at validateFrameworkName (./node_modules/@storybook/core-server/node_modules/@storybook/core-common/dist/index.js:21:4271)
    at buildDevStandalone (./node_modules/@storybook/core-server/dist/index.js:119:1432)
    at async withTelemetry (./node_modules/@storybook/core-server/dist/index.js:65:3948)
    at async dev (./node_modules/@storybook/cli/dist/generate.js:514:401)
    at async Command.<anonymous> (./node_modules/@storybook/cli/dist/generate.js:529:225)

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.

Problem running storybook dev inside of "." abs: "/home/dubenko/test-plugin"

Steps to reproduce

npx @kinvolk/headlamp-plugin create test-plugin 
cd test-plugin
npm run storybook

sniok avatar May 15 '24 10:05 sniok