-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
getstorybook shouldn't use yarn if there's no yarn.lock
#3384
Comments
In addition, and I'm not sure if it is related, by I am getting the following error when installing Storybook (using
|
Weird, for me it installs the stable versions. What does this command output for you?
|
I get nothing running that but
|
Tried it again, same result even after deleting everything from my project.
|
Installing |
Can you please check it on |
This is very easy to reproduce: # Use latest node:
nvm install v9.11.1
# Create a blank React project:
npm i -g create-react-app
create-react-app app
cd app
# Install and setup Storybook
npm i -g @storybook/cli
npx getstorybook
npm run storybook Result:
{
"name": "app",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.3.2",
"react-dom": "^16.3.2",
"react-scripts": "1.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"storybook": "start-storybook -p 9009 -s public",
"build-storybook": "build-storybook -s public"
},
"devDependencies": {
"@storybook/react": "^4.0.0-alpha.3",
"@storybook/addon-actions": "^4.0.0-alpha.3",
"@storybook/addon-links": "^4.0.0-alpha.3",
"@storybook/addons": "^4.0.0-alpha.3",
"babel-core": "^7.0.0-bridge.0",
"babel-runtime": "^7.0.0-beta.3"
}
} This is using Storybook |
Is there a chance that you have yarn on your machine? Which version is it? What is the output of this command for you?
|
I do but why would that matter? |
I removed Versions: npm -v
5.6.0
node -v
v9.11.1 |
|
Ok, thanks for the info. This is super unexpected and I would categorize this as a bug since it breaks any application where a developer does not use that flag. I expect that installing with |
Sounds like a good idea. Want to open a PR? The code to change would be this: https://github.com/storybooks/storybook/blob/master/lib/cli/lib/has_yarn.js |
yarn.lock
Can I give this a try? If @danawoodman doesn't mind of course. |
Go for it! |
Released as |
Bug(?)
Using latest
@storybook/cli
runninggetstorybook
installs alpha version of storybook versus latest stable version.Steps to reproduce
The installed version of Storybook dependencies are
alpha
versions. Considering the versions are alpha, it seems unexpected that the most recent version ofgetstorybook
would install them rather than the latest stable release.Affected platforms
I'm on OSX (10.13.3)
The text was updated successfully, but these errors were encountered: