react-styleguidist: Error parsing objects in example markdown

First of all, thank you for this wonderful tool; it’s really helped our component development process.

I’m running into an issue where colons in my readme.md are tripping up the parser:

screen shot 2017-03-16 at 1 34 22 pm

This works as expected when I populate the object using non-colon syntax:

screen shot 2017-03-16 at 1 34 37 pm

Also, as a less critical note, it seems that missing semicolons also trips up the parser:

screen shot 2017-03-16 at 1 37 13 pm

I’m on Webpack 2.2.1, Styleguidist 5.0.0-rc.1 (though I tried on beta.13 and beta.15 as well). See below for my styleguidist config:

{
	components: `${__dirname}/javascripts/@(containers|components)/**/index.jsx`,
	skipComponentsWithoutExample: true,
	serverPort: 9000,
	require: [
		`./javascripts/helpers/logger.js`,
		`./stylesheets/index.styl`,
		`./stylesheets/styleguidist.styl`,
	],
}

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

@fdaciuk — yea I ended up being to solve this pretty quickly by removing the dependency that was requiring the old version of acorn. You can try an npm ls to get a sense of what might be requiring the old version of acorn. You’ll also want to empty node_modules and rerun npm install

Do you have anything in ls -a node_modules/buble/node_modules? My only guess is that one of dependencies of your project has older version of one of Buble’s dependencies, and when you modify module resolution in your webpack config Buble receives this older version from the root node_modules instead of node_modules/buble/node_modules.