getstorybook says Unsupported Project type. in an empty project

@pixabay

Story

If you want to install storybook with getstorybook command in your empty project, it instructions it is an unsupported Project type as below.

mkdir example-project && cd $_
npm init -y
getstorybook
getstorybook - the simplest way to add a storybook to your project. 

 • Detecting project type. ✓
    Unsupported Project type. (code: UNDETECTED)
    Visit http://getstorybook.io for more information.

Detect.js

The Author wrote the instruction in below file.

https://github.com/storybooks/getstorybook/blob/master/lib/detect.js

It looks like we need to install react.js before using getstorybook command.

npm install --save react react-dom

retry it

getstorybook

Now, we can use npm run storybook. Enjoy:)