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

Components defined with relative paths are not resolved correctly #192

Closed
alj1s opened this issue Oct 11, 2016 · 1 comment
Closed

Components defined with relative paths are not resolved correctly #192

alj1s opened this issue Oct 11, 2016 · 1 comment
Labels

Comments

@alj1s
Copy link

alj1s commented Oct 11, 2016

This issue seems to have been introduced in 4.0.

Setup: Specify a array of components in config file by path relative to config folder:

  components: function() {
    return ['./lib/components/Button/Button.js'];
  },

Expected: styleguide runs successfully.
Actual: npm run styleguide-server fails with errors:

ERROR in .//react-styleguidist/loaders/styleguide.loader.js!.//react-styleguidist/src/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./lib/components/Button/Button.js in /Users/andrewjones/code/react-styleguidist-example/node_modules/react-styleguidist/src
@ .//react-styleguidist/loaders/styleguide.loader.js!.//react-styleguidist/src/index.js 5:10-54

ERROR in .//react-styleguidist/loaders/styleguide.loader.js!.//react-styleguidist/src/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./lib/components/Button/Button.js in /Users/andrewjones/code/react-styleguidist-example/node_modules/react-styleguidist/src
@ .//react-styleguidist/loaders/styleguide.loader.js!.//react-styleguidist/src/index.js 6:9-61

See here for repro: https://github.com/ximenean/react-styleguidist-example
Downgrading styleguidist to v3 works as expected.

@sapegin sapegin added the bug label Oct 11, 2016
@sapegin sapegin changed the title components defined with relative paths are not resolved correctly Components defined with relative paths are not resolved correctly Oct 11, 2016
@alj1s
Copy link
Author

alj1s commented Oct 11, 2016

Fast work! Thanks.

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

No branches or pull requests

2 participants