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

Version 4 fails on startup with Unexpected token #4668

Closed
kendagriff opened this issue Oct 31, 2018 · 7 comments
Closed

Version 4 fails on startup with Unexpected token #4668

kendagriff opened this issue Oct 31, 2018 · 7 comments

Comments

@kendagriff
Copy link

npm run storybook fails with "Unexpected token" on version 4.

> [email protected] storybook /Users/kendagriff/platform-app-client
> start-storybook -p 6006

/Users/kendagriff/platform-app-client/node_modules/@storybook/core/dist/server/config/webpack.config.default.js:13
  return { ...storybookBaseConfig,
           ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/kendagriff/platform-app-client/node_modules/@storybook/core/server.js:1:92)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] storybook: `start-storybook -p 6006`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] storybook script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kendagriff/.npm/_logs/2018-10-31T18_29_17_317Z-debug.log

System:

  • Framework: React 16.3.0
  • Version: 4.0.0

Any suggestions? It seems to be related to babel somehow (failing on ...).

@igor-dv
Copy link
Member

igor-dv commented Oct 31, 2018

What Node version do you use ?

@kendagriff
Copy link
Author

v8.1.2. Thanks for the quick reply!

@igor-dv
Copy link
Member

igor-dv commented Oct 31, 2018

That is strange. I thought spread is supported since the early 8 versions... Can you check with 8.11 ?

@igor-dv
Copy link
Member

igor-dv commented Nov 1, 2018

@igor-dv igor-dv closed this as completed Nov 1, 2018
@kendagriff
Copy link
Author

kendagriff commented Nov 1, 2018

Yes! Thanks, that fixed it. Unfortunately my build is now failing because of something else. I'll research and report back.

@jithinvj
Copy link

jithinvj commented Dec 8, 2018

Hi ,

I am having the exact same issue with latest version of storybook. Am on node v6.6.0.

When using @storybook/react v4.0.0-alpha.1 storybook is loading perfectly. Even the webpack default config on that version is using spread operator, how it's working?

Thanks in advance,
Jithin Varghese

@igor-dv
Copy link
Member

igor-dv commented Dec 8, 2018

We are transpiling our non-client code for node 8.11 that supports the spread operator.
Also, it's better for performance, and many js features are natively supported. It's better for webpack 4, as well - https://twitter.com/wSokra/status/967852475918274561

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

No branches or pull requests

3 participants