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

@storybook/theming brandImage 404 using manager.js #10055

Closed
ericberens opened this issue Mar 5, 2020 · 2 comments
Closed

@storybook/theming brandImage 404 using manager.js #10055

ericberens opened this issue Mar 5, 2020 · 2 comments

Comments

@ericberens
Copy link

ericberens commented Mar 5, 2020

Describe the bug

brandImage results in GET https://localhost:8009/static/media/logo.63592a43.png 404 (Not Found) using a manager.js config.

To Reproduce
Steps to reproduce the behavior:

  1. Run storybook (using start-storybook -c .storybook -p 8009)
  2. See brandImage not rendered properly and a 404 in the Network panel

Expected behavior

The brandImage should load and render properly when using a manager.js config file and a custom theme.

Screenshots

Screen Shot 2020-03-04 at 7 48 09 PM

Code snippets

import logo from './static/images/logo.png';
import { addons } from "@storybook/addons";
import { create } from "@storybook/theming/create";

addons.setConfig({
  theme: create({
    // Base theme
    base: 'light',

    // Custom branding
    brandImage: logo,
    brandTitle: 'BRAND TITLE,
    brandUrl: undefined
  })
});

System:

Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
  Binaries:
    Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
    Yarn: 1.17.3 - ~/Projects/web/node_modules/.bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
  Browsers:
    Chrome: 80.0.3987.122
    Firefox: 72.0.1
    Safari: 13.0.5
  npmPackages:
    @storybook/addon-a11y: 5.3.14 => 5.3.14 
    @storybook/addon-actions: 5.3.14 => 5.3.14 
    @storybook/addon-backgrounds: 5.3.14 => 5.3.14 
    @storybook/addon-events: 5.3.14 => 5.3.14 
    @storybook/addon-info: 5.3.14 => 5.3.14 
    @storybook/addon-knobs: 5.3.14 => 5.3.14 
    @storybook/addon-links: 5.3.14 => 5.3.14 
    @storybook/addon-notes: 5.3.14 => 5.3.14 
    @storybook/addon-viewport: 5.3.14 => 5.3.14 
    @storybook/addons: 5.3.14 => 5.3.14 
    @storybook/client-logger: 5.3.14 => 5.3.14 
    @storybook/core: 5.3.14 => 5.3.14 
    @storybook/core-events: 5.3.14 => 5.3.14 
    @storybook/react: 5.3.14 => 5.3.14 
    @storybook/theming: 5.3.14 => 5.3.14 

Additional context

The same package and theme setup using a config.js works as expected.

Additionally, I've seen #5878 but I am not using an SVG. Using a hosted image (e.g. https://placehold.it/350x150) works as expected.

@ericberens
Copy link
Author

Possibly a duplicate of #9443

@shilman
Copy link
Member

shilman commented Mar 5, 2020

Yeah, looks like a duplicate of #9443. Can you try upgrading to 6.0.0-alpha and verify that it's fixed for you?

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

2 participants