JSUI icon indicating copy to clipboard operation
JSUI copied to clipboard

Storybook non functional - cannot resolve data.json

Open falconmick opened this issue 6 years ago • 1 comments

Hi Kitze.

I'm just getting started with contributing so I thought having storybook up and running would be a good way to iterate fast on my items. However when I try to run storybook the following happens:

ERROR in ./src/components/ProjectTree/stories.js
Module not found: Error: Can't resolve './data.json' in '/Users/falconmick/dev/JSUI/src/components/ProjectTree'
 @ ./src/components/ProjectTree/stories.js 11:12-34
 @ ./src/components .stories\.js$
 @ ./.storybook/config.js
 @ multi ./node_modules/@storybook/react/dist/server/config/polyfills.js ./node_modules/@storybook/react/dist/server/config/globals.js ./node_modules/webpack-hot-middleware/client.js?reload=true ./.storybook/config.js
Child html-webpack-plugin for "index.html":
         Asset    Size  Chunks  Chunk Names
    index.html  568 kB       0
       [0] ./node_modules/@storybook/react/node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/react/dist/server/index.html.ejs 1.7 kB {0} [built]
       [1] ./node_modules/lodash/lodash.js 540 kB {0} [built]
       [2] (webpack)/buildin/module.js 517 bytes {0} [built]
Child html-webpack-plugin for "iframe.html":
          Asset    Size  Chunks  Chunk Names
    iframe.html  568 kB       0
       [0] ./node_modules/@storybook/react/node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/react/dist/server/iframe.html.ejs 1.16 kB {0} [built]
       [1] ./node_modules/lodash/lodash.js 540 kB {0} [built]
       [2] (webpack)/buildin/module.js 517 bytes {0} [built]

I storybook still in the working list, or is it just abandoned code?

falconmick avatar Jun 08 '18 09:06 falconmick

I tried fixing by giving ProjectTree a proper stories.js file - the current one is for a component called LessonCode). Storybook starts, but its front page won't load in a browser. The webpack target for Storybook is set to electron-renderer, so it needs to be loaded from within Electron. I tried that, but got a blank page (presumably a JS error in the rendering) so it'll need further debugging.

yozlet avatar Jun 10 '18 05:06 yozlet