Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Manager build is broken #6251

Closed
langri-sha opened this issue Mar 24, 2019 · 5 comments
Closed

Error: Manager build is broken #6251

langri-sha opened this issue Mar 24, 2019 · 5 comments
Milestone

Comments

@langri-sha
Copy link
Contributor

langri-sha commented Mar 24, 2019

Describe the bug

I am trying to add Storybook middleware to my web server. When upgrading to 5.0.x and making some necessary adjustments, the Storybook build and standalone server work, but I am receiving an error trying to create the middleware.

To Reproduce

This is the helper function I'm using to obtain the Storybook router.

// @flow
// middleware.js
import storybook from '@storybook/core/dist/server/dev-server'
import path from 'path'

export default function createStorybookMiddleware () {
  const configDir = path.resolve(__dirname, 'src')

  return storybook({
    configDir,
    output: { publicPath: '/storybook/' },
    publicPath: '/storybook/',
    ignorePreview: true,
    debugWebpack: true
  })
}

Expected behavior
I would expect that I am able to get a reference to the router and use it in my web server.

Screenshots

image

System:

  • OS: Arch Linux
  • Framework: react
  • Addons: actions, centered, info, knobs, notes, storysource, viewport
  • Version: 5.0.3
@shilman shilman added this to the 5.0.x milestone Mar 24, 2019
@Dema
Copy link

Dema commented Mar 24, 2019

It could possibly be connected with wrong "latest" tag on npm release. I think it is erroneously set to 3.4.12 instead of 5.0.4

@langri-sha
Copy link
Contributor Author

Thanks for the heads up! I'll take a look at my lockfile to see if there's anything older pulled in by accident 🕵️‍♀️!

@langri-sha
Copy link
Contributor Author

I upgraded to v5.0.5 and can confirm from my lockfile that all the dependencies are also on v5.0.5. Still receiving Error: Manager build is broken with { error: null }.

@shilman
Copy link
Member

shilman commented Mar 28, 2019

@ndelangen Any known changes to middleware in 5.0?

@langri-sha
Copy link
Contributor Author

Would appear I was actually missing some Storybook packages. After adding everything there was a small error for the preview build. This is the setup I have now that's working:

// @flow
// middleware.js
import storybook from '@storybook/core/dist/server/dev-server'
import path from 'path'

export default function createStorybookMiddleware () {
  const configDir = path.resolve(__dirname, 'src')

  return storybook({
    configDir,
    output: { publicPath: '/storybook/' },
    publicPath: '/storybook/',
    packageJson: require('./package.json')
  })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants