-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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/cli] Fails if package.json at /home/user has no license field. #3446
Comments
I believe this is a warning thrown by If you do Does this prevent I personally don't think we should get into the business of catching |
@danielduan thanks.
Yes it does prevent getstorybook from completing the install.Content of
|
If you or someone would like to open a PR to fix this, please do. |
I would like to give this a try. I assume the intended behaviour is to install regardless of a |
I'm not quite sure how to tackle this problem. After mimicking error locally, I looked into the code and got to the point where https://github.com/storybooks/storybook/blob/master/lib/cli/bin/generate.js#L98 is called, which leads me to https://github.com/storybooks/storybook/blob/master/lib/cli/lib/helpers.js#L86. That should be the last line logged, as there is no red or green chalk added before the repeated Am I looking at the wrong place or missing something? |
It seems that here it goes to the error if the license is not specified. @Keraito if this finding helps you to fix ,feel free to. |
That’s weird that it checks package.json in your home directory. Unless you have no package.json in the directory where you run getstorybook. You might want to create it first using |
Did this issue get fixed.I was trying today on 3.4.3version of the cli and this went through with out any errors.I understand that @Keraito code is not merged.But the issue is not there anymore. Please confirm |
@sunilhari can you check whether
|
|
Sorry some way it was using npm.Yeah the issue still exist.yarn.lock was not there |
released as |
It fixed my problem |
Summary
storybook/cli
gives an error when initiating a repo with$ getstorybook
.Here's the error:
Steps to reproduce
sudo npm i -g @storybook/cli
getstorybook
Please specify which version of Storybook and optionally any affected addons that you're running
storybook/cli: 3.4.2
Solution
It works fine if I add a
license
field inpackage.json
athome
dir.The text was updated successfully, but these errors were encountered: