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

Babelrc resolving to wrong location #2635

Closed
alansouzati opened this issue Jan 3, 2018 · 5 comments
Closed

Babelrc resolving to wrong location #2635

alansouzati opened this issue Jan 3, 2018 · 5 comments

Comments

@alansouzati
Copy link

Issue details

When I have a local babel preset, storybook is not able to locate it.

Steps to reproduce

  • Run start-storybook where you have a local babel preset. For example:
{
  "presets": [
    "./tools/babel-preset-env",
    "stage-2",
    "react"
  ]
}

Please specify which version of Storybook and optionally any affected addons that you're running

  • @storybook/react 3.3.3

Affected platforms

  • Npm 5.6.0
  • Node v8.9.4
  • macOS High Sierra

Screenshots / Screencast / Code Snippets (Optional)

ERROR in ./storybook/addons.js
Module build failed: Error: Couldn't find preset "./tools/babel-preset-env" relative to directory "/Users/user/workspace/project/storybook"

@Hypnosphi
Copy link
Member

Hypnosphi commented Jan 4, 2018

Looks like it locates the file itself, but fails to resolve relative path ./tools/babel-preset-env from it correctly

Probably related: #2610

@alansouzati
Copy link
Author

alansouzati commented Jan 4, 2018

my current work around is to add a .babelrc file inside storybook folder that does not use the local preset.

I will try to investigate what is going on.

@stale
Copy link

stale bot commented Feb 18, 2018

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

@stale stale bot added the inactive label Feb 18, 2018
@Hypnosphi Hypnosphi self-assigned this Feb 18, 2018
@stale stale bot removed the inactive label Feb 18, 2018
@Hypnosphi Hypnosphi added the todo label Feb 18, 2018
@dijs
Copy link

dijs commented Aug 13, 2018

Any more word on this? I need to reference a local babel plugin and am running into the exact same issue.

@Hypnosphi
Copy link
Member

Released as 4.0.0-alpha.20

@issue-sh issue-sh bot removed merged labels Sep 1, 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

3 participants