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

Storybook fails to build #87

Closed
kheyse-werk opened this issue Mar 27, 2018 · 2 comments
Closed

Storybook fails to build #87

kheyse-werk opened this issue Mar 27, 2018 · 2 comments

Comments

@kheyse-werk
Copy link

Bug reports:

Attempt to build/run storybook fails.
I am using Mac, with node v8.10.0 and npm 5.6.0.

Did a clean checkout of master, ran npm install and then npm run storybook.

Got this result:

> react-svg-pan-zoom@2.16.0 storybook ~/react-svg-pan-zoom
> cross-env BABEL_ENV=commonjs start-storybook -p 9001 -s storybook/public -c storybook

info @storybook/react v3.3.15
info
info => Loading static files from: ~/react-svg-pan-zoom/storybook/public .
Failed to load ./.env.
info => Loading custom .babelrc
info => Loading custom addons config.
info => Using default webpack setup based on "Create React App".
~/react-svg-pan-zoom/node_modules/webpack/lib/DefinePlugin.js:42
		compiler.hooks.compilation.tap(
		               ^

TypeError: Cannot read property 'compilation' of undefined
    at DefinePlugin.apply (~/react-svg-pan-zoom/node_modules/webpack/lib/DefinePlugin.js:42:18)
    at Compiler.apply (~/react-svg-pan-zoom/node_modules/tapable/lib/Tapable.js:375:16)
    at webpack (~/react-svg-pan-zoom/node_modules/@storybook/react/node_modules/webpack/lib/webpack.js:33:19)
    at exports.default (~/react-svg-pan-zoom/node_modules/@storybook/react/dist/server/middleware.js:29:40)
    at Object.<anonymous> (~/react-svg-pan-zoom/node_modules/@storybook/react/dist/server/index.js:153:34)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (~/react-svg-pan-zoom/node_modules/@storybook/react/bin/index.js:3:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-svg-pan-zoom@2.16.0 storybook: `cross-env BABEL_ENV=commonjs start-storybook -p 9001 -s storybook/public -c storybook`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-svg-pan-zoom@2.16.0 storybook script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2018-03-27T12_12_44_504Z-debug.log
@chrvadala
Copy link
Owner

chrvadala commented Mar 28, 2018

It seems a storybook bug
storybookjs/storybook#3083 (comment)
storybookjs/storybook#3148

I tried to install it with yarn and it worked. Probably the yarn.lock locks some dependency to a working version.
I suggest you to use yarn install until they release a fix (with storybook 4).

@chrvadala
Copy link
Owner

Fix released with 3.0 version

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

No branches or pull requests

2 participants