Skip to content

Instantly share code, notes, and snippets.

@avaly
Created January 25, 2017 16:27
Show Gist options
  • Select an option

  • Save avaly/07c0cb7f249cbf46d113bbd4154104ac to your computer and use it in GitHub Desktop.

Select an option

Save avaly/07c0cb7f249cbf46d113bbd4154104ac to your computer and use it in GitHub Desktop.
react-styleguidist-loader-options-plugin-issue
$ styleguidist server --verbose
Styleguidist config:
Object {
"assetsDir": undefined,
"components": "./lib/components/**/[A-Z]*.js",
"configDir": "/home/foo/dev/react-styleguidist-example",
"configureServer": undefined,
"context": Object {},
"contextDependencies": undefined,
"defaultExample": "/home/foo/dev/react-styleguidist-example/node_modules/react-styleguidist/scripts/templates/DefaultExample.md",
"getComponentPathLine": [Function default],
"getExampleFilename": [Function default],
"handlers": Array [
[Function propTypeHandler],
[Function propTypeCompositionHandler],
[Function propDocBlockHandler],
[Function flowTypeHandler],
[Function flowTypeDocBlockHandler],
[Function defaultPropsHandler],
[Function componentDocblockHandler],
[Function displayNameHandler],
[Function componentMethodsHandler],
[Function componentMethodsJsDocHandler],
[Function displayNameHandler],
],
"highlightTheme": "base16-light",
"previewDelay": 500,
"propsParser": undefined,
"resolver": [Function findExportedComponentDefinitions],
"sections": Array [],
"serverHost": "localhost",
"serverPort": 3000,
"showCode": false,
"skipComponentsWithoutExample": false,
"styleguideDir": "/home/foo/dev/react-styleguidist-example/styleguide",
"styles": Object {},
"template": "/home/foo/dev/react-styleguidist-example/node_modules/react-styleguidist/scripts/templates/index.html",
"theme": Object {},
"title": "React Style Guide Example",
"updateWebpackConfig": undefined,
"verbose": false,
"webpackConfig": [Function webpackConfig],
"webpackConfigFile": undefined,
}
Webpack config:
Object {
"cache": true,
"context": "/home/foo/dev/react-styleguidist-example",
"devtool": "eval",
"entry": Array [
"/home/foo/dev/react-styleguidist-example/node_modules/react-dev-utils/webpackHotDevClient.js",
"/home/foo/dev/react-styleguidist-example/node_modules/react-styleguidist/lib/index",
],
"module": Object {
"exprContextCritical": true,
"exprContextRecursive": true,
"exprContextRegExp": false,
"exprContextRequest": ".",
"loaders": Array [],
"rules": Array [
Object {
"include": "/home/foo/dev/react-styleguidist-example/lib",
"loader": "babel-loader",
"test": /\.jsx?$/,
},
Object {
"include": "/home/foo/dev/react-styleguidist-example/lib",
"loader": "style-loader!css-loader?modules&importLoaders=1",
"test": /\.css$/,
},
],
"unknownContextCritical": true,
"unknownContextRecursive": true,
"unknownContextRegExp": false,
"unknownContextRequest": ".",
"unsafeCache": true,
"wrappedContextCritical": false,
"wrappedContextRecursive": true,
"wrappedContextRegExp": /.*/,
},
"node": Object {
"Buffer": true,
"__dirname": "mock",
"__filename": "mock",
"console": false,
"global": true,
"process": true,
"setImmediate": true,
},
"output": Object {
"chunkFilename": "build/[name].js",
"crossOriginLoading": false,
"devtoolLineToLine": false,
"filename": "build/bundle.js",
"hashDigest": "hex",
"hashDigestLength": 20,
"hashFunction": "md5",
"hotUpdateChunkFilename": "[id].[hash].hot-update.js",
"hotUpdateFunction": "webpackHotUpdate",
"hotUpdateMainFilename": "[hash].hot-update.json",
"jsonpFunction": "webpackJsonp",
"library": "",
"libraryTarget": "var",
"path": "/home/foo/dev/react-styleguidist-example/styleguide",
"sourceMapFilename": "[file].map[query]",
"strictModuleExceptionHandling": false,
},
"performance": Object {
"hints": false,
"maxAssetSize": 250000,
"maxEntrypointSize": 250000,
},
"plugins": Array [
HtmlWebpackPlugin {
"options": Object {
"cache": true,
"chunks": "all",
"compile": true,
"excludeChunks": Array [],
"favicon": false,
"filename": "index.html",
"hash": false,
"inject": true,
"minify": false,
"showErrors": true,
"template": "html-webpack-plugin/lib/loader.js!/home/foo/dev/react-styleguidist-example/node_modules/react-styleguidist/scripts/templates/index.html",
"title": "React Style Guide Example",
"xhtml": false,
},
},
DefinePlugin {
"definitions": Object {
"process.env": Object {
"NODE_ENV": "\"development\"",
},
},
},
LoaderOptionsPlugin {
"options": Object {
"debug": true,
"minimize": false,
"options": Object {
"styleguidist": Object {
"assetsDir": undefined,
"components": "./lib/components/**/[A-Z]*.js",
"configDir": "/home/foo/dev/react-styleguidist-example",
"configureServer": undefined,
"context": Object {},
"contextDependencies": undefined,
"defaultExample": "/home/foo/dev/react-styleguidist-example/node_modules/react-styleguidist/scripts/templates/DefaultExample.md",
"getComponentPathLine": [Function default],
"getExampleFilename": [Function default],
"handlers": Array [
[Function propTypeHandler],
[Function propTypeCompositionHandler],
[Function propDocBlockHandler],
[Function flowTypeHandler],
[Function flowTypeDocBlockHandler],
[Function defaultPropsHandler],
[Function componentDocblockHandler],
[Function displayNameHandler],
[Function componentMethodsHandler],
[Function componentMethodsJsDocHandler],
[Function displayNameHandler],
],
"highlightTheme": "base16-light",
"previewDelay": 500,
"propsParser": undefined,
"resolver": [Function findExportedComponentDefinitions],
"sections": Array [],
"serverHost": "localhost",
"serverPort": 3000,
"showCode": false,
"skipComponentsWithoutExample": false,
"styleguideDir": "/home/foo/dev/react-styleguidist-example/styleguide",
"styles": Object {},
"template": "/home/foo/dev/react-styleguidist-example/node_modules/react-styleguidist/scripts/templates/index.html",
"theme": Object {},
"title": "React Style Guide Example",
"updateWebpackConfig": undefined,
"verbose": true,
"webpackConfig": [Function webpackConfig],
"webpackConfigFile": undefined,
},
},
"test": Object {
"test": [Function test],
},
},
},
HotModuleReplacementPlugin {
"fullBuildTimeout": 200,
"multiStep": undefined,
},
LoaderOptionsPlugin {
"options": Object {
"options": Object {
"foo": "bar",
},
"test": Object {
"test": [Function test],
},
},
},
],
"resolve": Object {
"alias": Object {
"rsg-codemirror-theme.css": "codemirror/theme/base16-light.css",
"rsg-components": "/home/foo/dev/react-styleguidist-example/node_modules/react-styleguidist/lib/rsg-components",
},
"aliasFields": Array [
"browser",
],
"extensions": Array [
".js",
".jsx",
".json",
],
"mainFields": Array [
"browser",
"module",
"main",
],
"modules": Array [
"node_modules",
],
"unsafeCache": true,
},
"resolveLoader": Object {
"extensions": Array [
".js",
".json",
],
"mainFields": Array [
"loader",
"main",
],
"unsafeCache": true,
},
"stats": Object {
"colors": true,
"context": "/home/foo/dev/react-styleguidist-example",
"reasons": true,
},
"target": "web",
}
Style guide server started at:
http://localhost:3000
Failed to compile.
Error in ./~/react-styleguidist/lib/index.js
Module build failed: TypeError: Cannot read property 'components' of undefined
@ ./~/react-styleguidist/lib/index.js 36:18-70 78:1-81:3
@ multi ./~/react-dev-utils/webpackHotDevClient.js ./~/react-styleguidist/lib/index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment