storybookjs/vue-cli-plugin-storybook

[Bug] Storybook 7 - Getting `TypeError: server.buildDev is not a function` after migration

Opened this issue · 1 comments

sybers commented

Describe the bug

it is not possible to use commands added to vue-cli-service by this plugin after migrating to Storybook v7.

Steps to reproduce the behavior

  1. On an existing project using Webpack 5 and Storybook@6
  2. Run yarn dlx storybook@latest upgrade to start the automigration tool.
  3. Complete the steps, I mostly kept the previous behaviour, it also installed some dependencies which are now peer.
  4. Run storybook via vue-cli-service storybook:serve -p 6006 -c config/storybook
  5. See error

Expected behavior

Storybook should work the same as before when properly migrated.

Logs

Below are the command and error I get.

➜ yarn storybook
yarn run v1.22.19
$ vue-cli-service storybook:serve -p 6006 -c config/storybook
 ERROR  TypeError: server.buildDev is not a function
TypeError: server.buildDev is not a function
    at /Users/xxx/Workspace/xxx/node_modules/vue-cli-plugin-storybook/lib/index.js:42:12
    at Service.run (/Users/xxx/Workspace/xxx/node_modules/@vue/cli-service/lib/Service.js:262:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

  • OS: macOS 13.3.1 (arm64)
  • Node.js version: 18.14.2
  • Yarn version: 1.22.19

Additional context

I took a look at the source for @storybook/core-server and it looks like buildDev is not an exported function anymore. I tried to replace it with build but it seems they also changed the parameter names/format.
I could get the dev server to run but unfortunately my Webpack aliases were not processed. I didn't investigate more than that, hope it helps :)

sybers commented

Hey, are there any updated on this ? It is still preventing us from migrating to Storybook@7 :/