Having a frozen lockfile prevents storybook from installing its dependencies during init
See original GitHub issueDescribe the bug Having a frozen lockfile prevents Storybook from installing its dependencies during init.
To Reproduce
- Have a project with some dependencies
- Have a
.yarnrcfile with--install.frozen-lockfile true - Run
yarn sb init
Expected behavior
Storybook should install dependencies using yarn’s cli, rather than modifying the package.json itself.
Screenshots

Code snippets
.yarnrc:
--install.frozen-lockfile true
save-prefix ""
Note that Storybook also completely ignored my save-prefix value.
System:
- OS: MacOS
- Device: Macbook Pro 2018
- Framework: React
- Addons: None
- Version: 4.0.7
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
error Your lockfile needs to be updated, but yarn was run with
Solution 2. run yarn add <package> which will generate a file yarn.lock in the project base folder if the command is run ...
Read more >Distribute UI across an organization - Storybook Tutorials
This chapter walks through design system distribution from packaging UI components to importing them into other apps. We'll also uncover time-saving techniques ...
Read more >cargo update - The Cargo Book
This command will update dependencies in the Cargo.lock file to the latest version. ... The --frozen flag also prevents Cargo from attempting to...
Read more >yarn install
Install all the dependencies listed within package.json in the local node_modules folder. yarn install --check-files. Verifies that already installed files in ...
Read more >The Cargo Book - GitHub Pages
Note that members of the workspaces listed explicitly will also have their path dependencies included in the workspace. Sometimes a package may have...
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 Free
Top 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

I’ll see if I can make some time, but I don’t think I’ll be able to do this anytime soon
Ooh-la-la!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.37 containing PR #6695 that references this issue. Upgrade today to try it out!
Because it’s a pre-release you can find it on the
@nextNPM tag.