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

5.1.0-rc.0 does not start: Error parsing babel config file #6864

Closed
kaiyoma opened this issue May 23, 2019 · 7 comments
Closed

5.1.0-rc.0 does not start: Error parsing babel config file #6864

kaiyoma opened this issue May 23, 2019 · 7 comments

Comments

@kaiyoma
Copy link

kaiyoma commented May 23, 2019

Describe the bug
After upgrading from 5.1.0-alpha.39 to 5.1.0-rc.0, Storybook does not start. It appears to be parsing a JavaScript file with a JSON parser.

Code snippets
Here's the shell output:

$ start-storybook -p 9001 -c storybook
info @storybook/react v5.1.0-rc.0
info
info => Loading presets
info => Loading presets
ERR! => Error parsing babel config file: JSON5: invalid character 'c' at 1:1
ERR! => Error parsing babel config file: JSON5: invalid character 'c' at 1:1

WARN Broken build, fix the error below.
WARN You may need to refresh the browser.

ERR! SyntaxError: JSON5: invalid character 'c' at 1:1
ERR!     at syntaxError (...\node_modules\json5\lib\parse.js:1083:17)
ERR!     at invalidChar (...\node_modules\json5\lib\parse.js:1028:12)
ERR!     at Object.value (...\node_modules\json5\lib\parse.js:287:15)
ERR!     at lex (...\node_modules\json5\lib\parse.js:78:42)
ERR!     at Object.parse (...\node_modules\json5\lib\parse.js:25:17)

Our .babelrc file is proper JSON and does not have a "c" character at the beginning of the file, but our babel.config.js does. It appears that Storybook is either trying to parse the wrong Babel config file or is using the wrong parser.

We've never had this problem with any previous release of Storybook. Something changed in the last week or two to cause this.

System:

  • OS: Windows 10
  • Framework: React
  • Version: 5.1.0-rc.0
@shilman
Copy link
Member

shilman commented May 23, 2019

Yeah this was a bad change made for #6633. We'll fix before the release

@ndelangen
Copy link
Member

Thanks for reporting @kaiyoma!

@ndelangen ndelangen self-assigned this May 24, 2019
@ndelangen
Copy link
Member

related: #6634

@shilman
Copy link
Member

shilman commented May 27, 2019

Shiver me timbers!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-rc.2 containing PR #6878 that references this issue. Upgrade today to try it out!

Because it's a pre-release you can find it on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed May 27, 2019
@kaiyoma
Copy link
Author

kaiyoma commented May 28, 2019

Thanks, the new release fixed the config parsing issue, though we still can't upgrade because a lot of other functionality is still broken. See #6813.

@shilman
Copy link
Member

shilman commented Jun 17, 2019

Huzzah!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-alpha.29 containing PR #7104 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @debug NPM tag.

@shilman
Copy link
Member

shilman commented Jun 20, 2019

Great Caesar's ghost!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.1.9 containing PR #7104 that references this issue. Upgrade today to try it out!

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