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

Upgrading to @storybook/react@3.2.11 throws configuration error #2122

Closed
rdjpalmer opened this issue Oct 24, 2017 · 8 comments
Closed

Upgrading to @storybook/react@3.2.11 throws configuration error #2122

rdjpalmer opened this issue Oct 24, 2017 · 8 comments

Comments

@rdjpalmer
Copy link

rdjpalmer commented Oct 24, 2017

After upgrading @kadira/storybook": "^2.14.0" using the getstorybook cli (to 3.2.11), now when I build storybook, the following error is thrown:

ModuleBuildError: Module build failed: Error: Options {"targets":{"browsers":["last 2 versions","safari >= 7"]},"modules":false} passed to .../babel-preset-env/lib/index.js which does not accept options.

It looks like it's these lines that are the cause of the issue, but I'm assuming it'll likely be something else, given the fact no one else seems to be suffering the same issue. https://github.com/storybooks/storybook/blob/e86a615c6450ef57b5965851ee7a9930a04e2b38/app/react/src/server/config/babel.prod.js#L4-L13

@danielduan
Copy link
Member

Try clearing your node_modules and lock files and reinstall all the dependencies.

Also, take a look at your webpack and babel config if you have custom ones. We upgraded to webpack 2 in storybook v3 and some of those configs might need to be updated.

@rdjpalmer
Copy link
Author

@danielduan Cleared both node_modules and the lock file, reinstalled the deps. Had already upgraded the webpack config to be compatible with Webpack 2, yet it still has the same issue.

Is there any more information I can provide you to make debugging perhaps a little easier?

@Hypnosphi
Copy link
Member

What does npm list babel-preset-env output for you?

@rdjpalmer
Copy link
Author

@Hypnosphi

@appearhere/bloom@0.28.0
└─┬ @storybook/react@3.2.11
  ├── babel-preset-env@1.6.1
  └─┬ babel-preset-react-app@3.0.3
    └── babel-preset-env@1.5.2

@Hypnosphi
Copy link
Member

And npm list babel-core?

@rdjpalmer
Copy link
Author

@Hypnosphi

@appearhere/bloom@0.28.0
├─┬ @storybook/react@3.2.11
│ └── babel-core@6.26.0
├─┬ babel-core@6.14.0
│ └─┬ babel-register@6.26.0
│   └── babel-core@6.26.0
├─┬ babel-jest@15.0.0
│ └── babel-core@6.26.0
├─┬ babel-plugin-transform-regenerator@6.14.0
│ └── babel-core@6.26.0
└─┬ jest@18.1.0
  └─┬ jest-cli@18.1.0
    └─┬ jest-runtime@18.1.0
      ├── babel-core@6.26.0
      └─┬ babel-jest@18.0.0
        └── babel-core@6.26.0  deduped

@Hypnosphi
Copy link
Member

Hypnosphi commented Oct 25, 2017

Is updating babel-core to latest version (6.26.0) in the root of your project an option for you? If it is, does it resolve the issue?

@rdjpalmer
Copy link
Author

@Hypnosphi seems to fix the issue. Thanks for all help 👌

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