question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to react-styleguidist 5.x

See original GitHub issue

Now that 5.x is out, this package still requires 4.5 of react-styleguidist

"react-styleguidist": ">=4.5 <5",

It would be great to get a new version that is compatible with 5.x

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MicheleBertolicommented, Jun 17, 2017

Anyone who wants to try the next version, please run: yarn add --dev snapguidist@next Feedback is highly appreciated.

1reaction
MicheleBertolicommented, Jun 11, 2017

Hello everyone! I had some free time during the weekend, and I tried to make the minimum amount of changes to the package in order to support v5. It works with the local example (yarn start) as you can see here:

rsg

However, I haven’t been able to make it work with the react-styleguidist’s basic example because it gives me the following errors:

Failed to compile.

Error in multi ./~/react-styleguidist/lib/index ./~/react-dev-utils/webpackHotDevClient.js ./~/snapguidist/src/styles.css
Module not found: Can't resolve 'style' in '/Users/michele/code/react-styleguidist/examples/basic'

 @ multi ./~/react-styleguidist/lib/index ./~/react-dev-utils/webpackHotDevClient.js ./~/snapguidist/src/styles.css

Error in ./~/react-styleguidist/lib/rsg-components/Playground/Playground.js
Module not found: Can't resolve 'babel' in '/Users/michele/code/react-styleguidist/examples/basic'

 @ multi ./~/react-styleguidist/lib/index ./~/react-dev-utils/webpackHotDevClient.js ./~/snapguidist/src/styles.css

Error in ./~/react-styleguidist/lib/rsg-components/Playground/Playground.js
Module not found: Can't resolve 'babel' in '/Users/michele/code/react-styleguidist/examples/basic'

 @ multi ./~/react-styleguidist/lib/index ./~/react-dev-utils/webpackHotDevClient.js ./~/snapguidist/src/styles.css

Repro steps:

  • git clone https://github.com/styleguidist/react-styleguidist.git
  • cd react-styleguidist/examples/basic
  • yarn add snapguidist@next.
  • apply the following changes to styleguide.config.js
@@ -1,5 +1,6 @@
+const snapguidist = require('snapguidist');
 const loaders = require('loaders');
-module.exports = {
+module.exports = snapguidist({
        components: 'src/components/**/[A-Z]*.js',
        defaultExample: true,
        webpackConfig: {
@@ -7,4 +8,4 @@ module.exports = {
                        loaders: loaders.all,
                },
        },
-};
+});
  • yarn styleguide
Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration - React Styleguidist
By default, Styleguidist will look for styleguide.config.js file in your project's root folder. You can change the location of the config file using ......
Read more >
React Styleguidist 5 - Medium
This is the biggest React Styleguidist update with 300 commits and four month of work. It incorporates a lot of rethinking and rewriting....
Read more >
react-styleguidist - npm
React components style guide generator. Latest version: 13.0.0, last published: 2 months ago. Start using react-styleguidist in your project ...
Read more >
Tech Weeklies - Easy Bolt-on Docs Using React Styleguidist
The talk will explain both the process and provide code examples on how to bootstrap your latest project in the least disruptive way....
Read more >
React styleguidist error with create react app - Stack Overflow
add styleguide.config.js with follow lines module.exports = { propsParser: require("react-docgen").parse, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found