-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Unexpected token { in v4.4.x #268
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
Comments
Are you using Node 4 or 5? This issue was reported several times but I still can‘t reproduce it. |
Thanks for the exact version where it was introduced, I could reproduce it finally! |
Witnessed using the following: |
Thanks for detailed bug report, should work in 4.4.3. I’ll add tests to prevent that later. |
What was the issue? |
@tizmagik Syntax not supported in Node 4/5, check the commit. |
Oh I see. I thought we transpiled, maybe we should? |
We transpile only browser code. Node 4+ supports enough features. We should just test that ;-) |
Ah gotcha 👍 Another option is to also run server code through babel but behind babel-preset-env. Might not be worth it if it was just these few lines that were incompatible, but testing against older versions of node in CI would help catch these in the future, so that's good 👌 |
It makes everything more complicated with a very tiny benefit ;-) |
Migrating from v4.1.0 to v4.4.3 we started getting errors when running the server:
ERROR in Unexpected token {
@ ./~/react-styleguidist/src/index.js 40:18-48 81:1-84:3
Same error back to v4.4.0.
Rolled back to v4.3.3 and all works fine.
I couldn't see any migration guide notes on the release.
Config if pretty basic:
Thanks.
The text was updated successfully, but these errors were encountered: