Missing yarn.lock from the init repo breaks Yarn installs
See original GitHub issueDescription
The following commit removed the yarn.lock
from gatsby-starter-default
:
As a result, the init script now goes through the following codepath:
The yarn import
command has been deprecated / removed in Yarn 2, and crashes.
Steps to reproduce
cd $(mktemp -d)
yarn init -2 -w
yarn dlx gatsby new my-gatsby
Expected result
Works
Actual result
Breaks
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Yarn install does not install missing modules in node_modules
My guess is that node_modules/.yarn-integrity is doing something here, such that if you update yarn.lock it'll notice things are out of sync. It ......
Read more >yarn.lock
During install, Yarn will only use the top-level yarn.lock file and will ignore any yarn.lock files that exist within dependencies. The top-level yarn.lock...
Read more >Should I commit the yarn.lock file and what is it for?
Yarn resolves these issues around versioning and non-determinism by using lock files and an install algorithm that is deterministic and reliable ...
Read more >Yarn lock: how it works and what you risk without maintaining ...
Answer: Well, yarn will, of course, install dependencies freshly added to package.json that are not yet installed and/or not present in yarn.
Read more >Advanced package manager features for npm, Yarn, and pnpm
If you add, update, or remove dependencies, you have to run yarn install , of course, to update yarn.lock , .pnp.cjs , and...
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 FreeTop 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
Top GitHub Comments
My understanding was that we were only removing it from the minimal starter because it was targetting a canary, and with that we were removing both lockfiles. I don’t know why we’d remove it from others.
If that’s the case shouldn’t
package-lock.json
have been deleted as well?