question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack error on static build

See original GitHub issue

Describe the bug Webpack loader error when building a static site using build-storybook, with default setup:

./stories/index.stories.js 9:55
Module parse failed: Unexpected token (9:55)
You may need an appropriate loader to handle this file type.
| import { Button, Welcome } from '@storybook/react/demo';

I have tried tweaking webpack.config.js in .storybook, but can’t figure out the correct settings that will get this to build correctly. Thanks for any assistance with this.

To Reproduce Steps to reproduce the behavior:

  1. Fresh repo (cloned from react-boilerplate, as per quick start instructions)
  2. npx -p @storybook/cli sb init
  3. npm run build-storybook

Expected behavior Storybook static site builds correctly. npm run storybook works fine locally, but cannot build a static site. Attempting to deploy to gh-pages using storybook-deployer has the same error (deploys successfully, but storybook is broken).

System:

  • OS: Windows 7
  • NodeJS 10.15.0
  • Storybook 4.1.11
  • React 16.6.0
  • Webpack 4.23.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
stale[bot]commented, Apr 23, 2019

Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

0reactions
Alphavadercommented, Aug 3, 2021

same here…

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-static : Error while building the static site for production
I am doing a proof of concept for the static site building by react-static. I just have some basic setup mostly defaults (basic...
Read more >
Error in webpack during build but not dev: "ERROR in static ...
It occurred when I ran npm run build , but everything worked fine using the webpack dev server ( npm run dev )....
Read more >
React-Static : Error while building the static site for production
I am doing a proof of concept for the static site building by react-static. I just have some basic setup mostly defaults (basic...
Read more >
DevServer - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Build error on static deployment where previously it worked
Hi I'm seeing a new build error on two static websites that were previously fine. A partial of the the build log and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found