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

ISS-6802 Fix issue with init in create-react-library projects #6815

Merged
merged 1 commit into from
May 19, 2019

Conversation

MikaelCarpenter
Copy link
Contributor

@MikaelCarpenter MikaelCarpenter commented May 17, 2019

Issue: #6802

There's two causes to this issue:

  • create-react-library puts react-scripts in devDeps
  • semver.gtr() fails if you pass it undefined

What I did

  • In the REACT_SCRIPTS generator, check both dependencies and devDependencies for react-scripts
  • Also, make sure it exists before trying to use semver

How to test

  1. npm install -g create-react-library
  2. create-react-library -s -t default test
  3. cd test
  4. npx -p @storybook/cli@next sb init

I tested init before and after the changes and looked good to me 👍

@vercel
Copy link

vercel bot commented May 17, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-fork-mikaelcarpenter-iss-6802-crl-init.storybook.now.sh

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@shilman shilman added bug patch:yes Bugfix & documentation PR that need to be picked to main branch and removed maintenance User-facing maintenance tasks labels May 19, 2019
@shilman shilman added this to the 5.0.x milestone May 19, 2019
@shilman shilman merged commit 070ed36 into storybookjs:next May 19, 2019
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compatibility with other tools patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants