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

[Storybooks] Static build is broken #187

Closed
alloy opened this issue Jun 29, 2017 · 5 comments
Closed

[Storybooks] Static build is broken #187

alloy opened this issue Jun 29, 2017 · 5 comments
Labels

Comments

@alloy
Copy link
Contributor

alloy commented Jun 29, 2017

Probably this issue.

@alloy alloy added the bug label Jun 29, 2017
@orta
Copy link
Contributor

orta commented Jul 17, 2017

When Storybooks 3.2.0 comes out, I'll look into this and updating storybooks

@kanaabe
Copy link
Contributor

kanaabe commented Aug 8, 2017

After 3.2.0 it looks like regular builds are now failing too. Issue seems to be in the node ./node_modules/.bin/build-storybook step of yarn deploy-storybook.

If I turn silent mode off here, I see the bug is from chunkhash:

(node:31241) DeprecationWarning: Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead.
Failed to build the storybook
chunk manager [entry]
static/[name].[chunkhash].bundle.js
Cannot use [chunkhash] for chunk in 'static/[name].[chunkhash].bundle.js' (use [hash] instead)
Error: Cannot use [chunkhash] for chunk in 'static/[name].[chunkhash].bundle.js' (use [hash] instead)
    at MainTemplate.replacePathVariables (/Users/kanaabe/Development/Artsy/reaction/node_modules/@storybook/react/node_modules/webpack/lib/TemplatedPathPlugin.js:64:9)

Next step for me is to figure out how to fix this, but i'm posting here in case this is obvious to anyone!

@kanaabe
Copy link
Contributor

kanaabe commented Aug 9, 2017

The problem seems to be with using the HotModuleReplacementPlugin in our storybook webpack config. Removing this will build the storybook and make it deployable. @orta I know you were working on HMR a bit...do you know why we use this plugin? I thought storybook comes with HMR. Removing the plugin doesn't make HMR work, but maybe it's a different issue?

@orta
Copy link
Contributor

orta commented Aug 9, 2017

@kanaabe - make the config not do HMR when deploying 👍

That's legit

@alloy
Copy link
Contributor Author

alloy commented Aug 10, 2017

Nice sleuthing @kanaabe 🙌

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

No branches or pull requests

3 participants