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

Unexpected token, expected , #999

Closed
natdm opened this issue May 7, 2017 · 5 comments
Closed

Unexpected token, expected , #999

natdm opened this issue May 7, 2017 · 5 comments

Comments

@natdm
Copy link

natdm commented May 7, 2017

Running freshly installed storybook with yarn run storybook in my Create React App based application yields...

ERROR in ./src/stories/index.js
Module build failed: SyntaxError: Unexpected token, expected , (8:13)

   6 | storiesOf('Welcome', module)
   7 |   .add('to Storybook', () => (
>  8 |     <Welcome showApp={linkTo('Button')}/>
     |              ^
   9 |   ));
  10 |
  11 | storiesOf('Button', module)

 @ ./.storybook/config.js 4:2-27
@usulpro
Copy link
Member

usulpro commented May 7, 2017

@natdm could you specify your OS and which way you installed Storybook (via getstorybook or manually)?

@natdm
Copy link
Author

natdm commented May 7, 2017

Apologies. macOS and yes, getstorybook.

@usulpro
Copy link
Member

usulpro commented May 7, 2017

Do you have any custom .babelrc or webpack.config.js in your project?
Is it a fresh install of CRA + getstorybook or you installed it to an existing project?
In this case, could you try this steps to check is it reproducible with default config?

@natdm
Copy link
Author

natdm commented Jun 14, 2017

To update, I blew out storybook, re-installed it after upgrading everything and it seems to work fine now.

@shilman
Copy link
Member

shilman commented Jun 14, 2017

Glad you sorted it out! Closing now, but feel free to re-open if you need to revisit.

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