Storybook: Getting initialization errors and error about not finding .storybook/config.js on startup

Created on 22 Jan 2019  Â·  4Comments  Â·  Source: storybookjs/storybook

Describe the bug
Following the quick-start options, it produced an TypeError, and starting up storybook give an error about not finding the config.js file, which is clearly present.

To Reproduce
Steps to reproduce the behavior:

  1. Start in javascript folder: cd app/javascript/
  2. run npx -p @storybook/cli sb init
  3. select "WEBPACK_REACT"
  4. See error TypeError: Cannot create property 'dependencies' on boolean 'false'
  5. run yarn run start-storybook -c .storybook -p 9009
  6. See error: Error: => Create a storybook config file in ".storybook/config.js".

Expected behavior
I expected to see a storybook viewer app pop up in my browser.

Screenshots
If applicable, add screenshots to help explain your problem.

(not a screenshot, _per se_, but a copy of the text on the terminal)

$ npx -p @storybook/cli sb init
npx: installed 448 in 15.198s
[BABEL] Note: The code generator has deoptimised the styling of /Users/tamara.temple/.npm/_npx/6849/lib/node_modules/@storybook/cli/node_modules/lodash/lodash.js as it exceeds the max of 500KB.

 sb init - the simplest way to add a storybook to your project. 

 • Detecting project type. ✓
    We couldn't detect your project type. (code: UNDETECTED)
    You can specify a project type explicitly via `sb init --type <type>` or follow some of the slow start guides: https://storybook.js.org/basics/slow-start-guide/

? Do you want to manually choose a Storybook project type to install? Yes
? Please choose a project type from the following list: WEBPACK_REACT
 • Adding storybook support to your "Webpack React" app
     TypeError: Cannot create property 'dependencies' on boolean 'false'
    at _callee$ (/Users/tamara.temple/.npm/_npx/6849/lib/node_modules/@storybook/cli/generators/WEBPACK_REACT/index.js:18:3)
    at call (/Users/tamara.temple/.npm/_npx/6849/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.tryCatch [as _invoke] (/Users/tamara.temple/.npm/_npx/6849/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:288:22)
    at Generator._invoke [as next] (/Users/tamara.temple/.npm/_npx/6849/lib/node_modules/@storybook/cli/node_modules/regenerator-runtime/runtime.js:114:21)
    at asyncGeneratorStep (/Users/tamara.temple/.npm/_npx/6849/lib/node_modules/@storybook/cli/generators/WEBPACK_REACT/index.js:34:103)
    at _next (/Users/tamara.temple/.npm/_npx/6849/lib/node_modules/@storybook/cli/generators/WEBPACK_REACT/index.js:36:194)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

$ y run start-storybook -c .storybook -p 9009
yarn run v1.12.1
$ /Users/tamara.temple/Projects/master/kickserv/node_modules/.bin/start-storybook -c .storybook -p 9009
info @storybook/react v3.4.8
info 
info => Loading custom .babelrc
/Users/tamara.temple/Projects/master/kickserv/node_modules/@storybook/react/dist/server/config.js:31
    throw err;
    ^

Error: => Create a storybook config file in ".storybook/config.js".
    at exports.default (/Users/tamara.temple/Projects/master/kickserv/node_modules/@storybook/react/dist/server/config.js:30:15)
    at exports.default (/Users/tamara.temple/Projects/master/kickserv/node_modules/@storybook/core/dist/server/middleware.js:19:16)
    at buildDev (/Users/tamara.temple/Projects/master/kickserv/node_modules/@storybook/core/dist/server/build-dev.js:163:36)
    at Object.<anonymous> (/Users/tamara.temple/Projects/master/kickserv/node_modules/@storybook/react/dist/server/index.js:23:22)
    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> (/Users/tamara.temple/Projects/master/kickserv/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)
    at tryModuleLoad (module.js:505:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Code snippets
If applicable, add code samples to help explain your problem.

System:

  • OS: MacOS High Sierra
  • Device: Macbook Pro 2015
  • Browser: chrome (but it never got there)
  • Framework: react
  • Addons: N/A
  • Version: 3.4.8 I can't run v4 because the project requires babel v6

Additional context
Add any other context about the problem here.

I have storybook running in a different folder, with lots more configuration, including a webpack.config.js file, but it began the same way.

inactive

Most helpful comment

Get the same error when I just run the quickstart script after creating an empty folder. 'TypeError: Cannot create property 'dependencies' on boolean 'false...''.

But if I add a package.json before running the script, it worked for me.

$ npm init -y
$ npx -p @storybook/cli sb init

All 4 comments

Get the same error when I just run the quickstart script after creating an empty folder. 'TypeError: Cannot create property 'dependencies' on boolean 'false...''.

But if I add a package.json before running the script, it worked for me.

$ npm init -y
$ npx -p @storybook/cli sb init

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrOrz picture MrOrz  Â·  3Comments

shilman picture shilman  Â·  3Comments

levithomason picture levithomason  Â·  3Comments

wahengchang picture wahengchang  Â·  3Comments

purplecones picture purplecones  Â·  3Comments