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

getstorybook: Unexpected token import #4002

Closed
SLYLXDYMJ opened this issue Aug 11, 2018 · 4 comments
Closed

getstorybook: Unexpected token import #4002

SLYLXDYMJ opened this issue Aug 11, 2018 · 4 comments

Comments

@SLYLXDYMJ
Copy link

Sorry, my English is not very good
I'm using storybook

123123
ver

Is there any solution?
I looked at other problems and couldn't find a solution

@stale stale bot added the inactive label Sep 1, 2018
@noscripter
Copy link

ping @arunoda @Hypnosphi @ndelangen @mnmtanish @shilman , since node.js does not support es modules by default by now, it is not recommended to use import directly in your modules, yet the published latest tag was set to be 3.4.11 which uses import directly.

So, my suggestion is, either:

  • transpile the code to normal commonjs codes

or:

  • set the latest tag to versions not using import, such as v4.0.0-alpha.22

@Q-Jason you can simply use npm i -g @stroybook/cli@alpha instead to get it started.

@stale stale bot removed the inactive label Sep 20, 2018
@noscripter
Copy link

ref #3035

@Hypnosphi
Copy link
Member

Hypnosphi commented Sep 20, 2018

it is not recommended to use import directly in your modules

We use babel-register

@Hypnosphi
Copy link
Member

@Q-Jason which version of @storybook/cli is it?

@storybookjs storybookjs deleted a comment from stale bot Oct 13, 2018
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

4 participants