storybook: getstorybook shouldn't use yarn if there's no `yarn.lock`

Bug(?)

Using latest @storybook/cli running getstorybook installs alpha version of storybook versus latest stable version.

Steps to reproduce

npm i -g @storybook/cli
getstorybook

The installed version of Storybook dependencies are alpha versions. Considering the versions are alpha, it seems unexpected that the most recent version of getstorybook would install them rather than the latest stable release.

Affected platforms

I’m on OSX (10.13.3)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Can I give this a try? If @danawoodman doesn’t mind of course.

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 npm and running it with npm that it would use npm. Maybe there is a way for storybook to do this more intelligently? Eg check if there is a yarn.lock instead of just a system available yarn?

In addition, and I’m not sure if it is related, by I am getting the following error when installing Storybook (using getstorybook -f) and running npm run storybook:

module.js:559
    throw err;
    ^

Error: Cannot find module './Mime'
    at Function.Module._resolveFilename (module.js:557:15)
    at Function.Module._load (module.js:484:25)
    at Module.require (module.js:606:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/someguy/code/someproject/node_modules/mime/index.js:3:12)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)