TypeError: Cannot set property 'storybook' of undefined from npx -p @storybook/cli sb init
See original GitHub issueI tried to follow the initial steps from here: https://www.learnstorybook.com/intro-to-storybook/react/en/get-started/
running:
npx create-react-app taskbox
cd taskbox
Then when I ran:
npx -p @storybook/cli sb init
I get the error TypeError: Cannot set property 'storybook' of undefined
This is the full message in my terminal:
sb init - the simplest way to add a storybook to your project.
• Detecting project type. ✓
• Adding storybook support to your "Create React App" based project
TypeError: Cannot set property 'storybook' of undefined
at default (/Users/levelingup/.npm/_npx/2358/lib/node_modules/@storybook/cli/generators/REACT_SCRIPTS/index.js:29:33)
at process._tickCallback (internal/process/next_tick.js:68:7)
running npx --version
: 6.9.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
storybook cannot read properties of undefined ... - You.com
The TypeError: Cannot read properties of undefined (reading 'type') exception occurs in storybook when one defines the argTypes in the default export object ......
Read more >CLI options - Storybook
Storybook comes with two CLI utilities: start-storybook and build-storybook . Storybook collects completely anonymous data to help us improve user experience.
Read more >Storybook throwing errors - Stack Overflow
The error log is pointing out that your min-indent package may be missing from your node_modules folder for whatever reason. Error: Cannot ......
Read more >MIGRATION.md - Storybook - Fossies
npx sb @next automigrate. The automigration suite also runs when you create a new project ( sb init ) or when you update...
Read more >Getting Started With Storybook for Vue - Egghead.io
Storybook can help you develop UI components in an isolated area without ... TypeError: Cannot read property 'plugins' of undefined ERR! at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, I would like to give this a shot…
Hello all, this issue has been fixed, and is not reproducible anymore. It was fixed a long time back, but we can see the latest code that handles adding
scripts
topackage.json
here https://github.com/storybookjs/storybook/blob/next/lib/cli/src/js-package-manager/JsPackageManager.ts#L193,L200@emileber, the no
package.json
issue is also not reproducible anymore. I believe, it was fixed in #8205 , more specifically, here, https://github.com/storybookjs/storybook/pull/8205/files#diff-8d17cc91321b260aaa782e8a42cd5634R69Therefore, I think this issue can be closed. cc/ @shilman